diff --git "a/data/cybersecurity.jsonl" "b/data/cybersecurity.jsonl" new file mode 100644--- /dev/null +++ "b/data/cybersecurity.jsonl" @@ -0,0 +1,148 @@ +{"id": "cybersecurity_20803", "domain": "cybersecurity", "question_title": "How does SSL/TLS work?", "question_body": "How does SSL work? I just realised we don't actually have a definitive answer here, and it's something worth covering. I'd like to see details in terms of: A high level description of the protocol. How the key exchange works. How authenticity, integrity and confidentiality are enforced. What the purpose of having CAs is, and how they issue certificates. Details of any important technologies and standards (e.g. PKCS) that are involved.", "question_score": 1300, "question_tags": ["tls", "certificates", "public-key-infrastructure"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "How does HTTPS work? HTTPS is based on public/private-key cryptography . This basically means that there is a key pair: The public key is used for encryption and the secret private key is required for decryption. A certificate is basically a public key with a label identifying the owner. So when your browser connects to an HTTPS server, the server will answer with its certificate. The browser checks if the certificate is valid : the owner information need to match the server name that the user requested. the certificate needs to be signed by a trusted certification authority. If one..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/20803/how-does-ssl-tls-work"} +{"id": "cybersecurity_211", "domain": "cybersecurity", "question_title": "How to securely hash passwords?", "question_body": "If I hash passwords before storing them in my database, is that sufficient to prevent them being recovered by anyone? I should point out that this relates only to retrieval directly from the database, and not any other type of attack, such as bruteforcing the login page of the application, keylogger on the client, and of course rubberhose cryptanalysis (or nowadays we should call it \" Chocolate Cryptanalysis \"). Of course any form of hash will not prevent those attacks.", "question_score": 947, "question_tags": ["appsec", "cryptography", "passwords", "hash"], "choices": {"A": "Google uses BSSID information from your WLAN Access Point to get an approximation of where you are located, even with GPS and WiFi turned off . Taken from “How does Google Maps estimate my location without GPS?” : Google and others like Apple and Skyhook build a Database which links WLAN BSSIDs to a geographic location. A BSSID is like the MAC address of a access point that gets broadcasted by that access point. It is therefore \"public viewable\" if the BSSID broadcast is enabled, which is the default for most access points. The BSSID operates on a lower layer...", "B": "There's a lot of ways you can attack a WiFi without knowing any passwords: Physical layer attacks: Simply jam the frequency spectrum with your own signal. That signal might just be noise, but it might also be a WiFi of your own under heavy load, with the nodes in that WiFi being configured not to play nice with others. (depending on the WiFi chipset, that can be extremely easy) Spectrum can only be used once! Tool : noise source (e.g. Gunn Diode, SDR device ), or normal AP Electromagnetic sledgehammer: EMI gun. Take microwave oven oscillator, attach directive antenna, pray...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/211/how-to-securely-hash-passwords"} +{"id": "cybersecurity_4781", "domain": "cybersecurity", "question_title": "Do any security experts recommend bcrypt for password storage?", "question_body": "On the surface bcrypt, an 11 year old security algorithm designed for hashing passwords by Niels Provos and David Mazieres, which is based on the initialization function used in the NIST approved blowfish algorithm seems almost too good to be true. It is not vulnerable to rainbow tables (since creating them is too expensive) and not even vulnerable to brute force attacks. However 11 years later, many are still using SHA2x with salt for storing password hashes and bcrypt is not widely adopted. What is the NIST recommendation with regards to bcrypt (and password hashing in general)? What do prominent security experts (such as Arjen Lenstra and so on) say about using bcrypt for password hashing?", "question_score": 674, "question_tags": ["passwords", "cryptography", "hash", "bcrypt"], "choices": {"A": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/4781/do-any-security-experts-recommend-bcrypt-for-password-storage"} +{"id": "cybersecurity_17421", "domain": "cybersecurity", "question_title": "How to store salt?", "question_body": "If you expect to store user password securely, you need to do at least the following: $pwd=hash(hash($password) + salt) Then, you store $pwd in your system instead of the real password. I have seen some cases where $pwd contains the salt itself. I wonder whether the salt should be stored separately, or is it OK if an attacker gets the hashed value and the salt at the same time. Why?", "question_score": 632, "question_tags": ["passwords", "hash", "salt"], "choices": {"A": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing...", "B": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "This combination is called a Secure attention key . The Windows kernel is \"wired\" to notify Winlogon and nobody else about this combination. In this way, when you press Ctrl + Alt + Del , you can be sure † that you're typing your password in the real login form and not some other fake process trying to steal your password. For example, an application which looks exactly like the windows login. In Linux, there's a loosely-defined equivalent which is Ctrl + Alt + Pause . However, it doesn't exactly do the same thing. It kills everything except where you're..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/17421/how-to-store-salt"} +{"id": "cybersecurity_4704", "domain": "cybersecurity", "question_title": "How does changing your password every 90 days increase security?", "question_body": "Where I work I'm forced to change my password every 90 days. This security measure has been in place in many organizations for as long as I can remember. Is there a specific security vulnerability or attack that this is designed to counter, or are we just following the procedure because \"it's the way it has always been done\"? It seems like changing my password would only make me more secure if someone is already in my account . This question was IT Security Question of the Week . Read the Jul 15, 2011 blog entry for more details or submit your own Question of the Week.", "question_score": 625, "question_tags": ["authentication", "passwords", "password-management"], "choices": {"A": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "B": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "C": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing...", "D": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/4704/how-does-changing-your-password-every-90-days-increase-security"} +{"id": "cybersecurity_214814", "domain": "cybersecurity", "question_title": "Why can I log in to my Facebook account with a misspelled email/password?", "question_body": "I've been playing around with different login forms online lately to see how they work. One of them was the Facebook login form. When I logged out of my account my email and password were autocompleted by my browser. Then I decided to misspell my email and see what would happen if I tried to log in. To my surprise I logged in with no problem after changing my email from example@gmail.com to example@gmail.comm . I then started experimenting with different spelling errors and I had no problem logging in as long as it was not too far off my real email. I tried changing the domain name as well example@gmadil.coom , my email prefix ezfxample@gmail.com etc. Then I also tried misspelling my password and as long as it was not too far off my real password I could log in no problem (with the password it worked when adding one random letter before or after the real password, but not when adding a letter in the middle of it). I also checked the actual data sent in the request by looking at it in Chrome DevTools and in fact it was the wrong data sent. How can this be? Should I be worried about my account's security?", "question_score": 561, "question_tags": ["authentication", "account-security", "facebook"], "choices": {"A": "If you are concerned about the privacy of your password and thus your account (which should be the case), you should try to educate the customer service. The developer FAQ from the public shaming project for this kind of recklessness lists a few good points and is worth a read. Also, you should point out that you feel insecure and lose trust in the company and will make them liable for any problems that stem from this no-go. You should also document that behaviour and try to get a written quote on their point of view if they do not...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "Because people are lazy and/or incompetent. And, well, you know, the Internet is full of chimpanzees . I would argue that all security questions are bad, but using the mother's maiden name is exceptionally bad: At least in Sweden, I can find out anyone's maiden name just with a simple call to the tax office. It is literally public information. It's 2018, and fairly common for couples to adopt the bride's name when getting married. Your mothers maiden name is then your surname. Great. Luis Casillas rightly adds: There are dozens of countries, with billions of inhabitants between them, where...", "D": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/214814/why-can-i-log-in-to-my-facebook-account-with-a-misspelled-email-password"} +{"id": "cybersecurity_25585", "domain": "cybersecurity", "question_title": "Is my developer's home-brew password security right or wrong, and why?", "question_body": "A developer, let's call him 'Dave', insists on using home-brew scripts for password security. See Dave's proposal below. His team spent months adopting an industry standard protocol using Bcrypt . The software and methods in that protocol are not new, and are based on tried and tested implementations that support millions of users. This protocol is a set of specifications detailing the current state of the art, software components used, and how they should be implemented. The implementation is based on a known-good implementation. Dave argued against this protocol from day one. His reasoning was that algorithms like Bcrypt, because they are published, have greater visibility to hackers, and are more likely to be targeted for attack. He also argued that the protocol itself was too bulky and difficult to maintain, but I believe Dave's primary hangup was the fact that Bcrypt is published. What I'm hoping to accomplish by sharing his code here, is to generate consensus on: Why home-brew is not a good idea, and What specifically is wrong with his script /** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, random # $time = date('mdYHis'); $rand = mt_rand().'\\n'; // crypt $crypt = crypt($user.$time.$rand); // hash function hash_it($string1, $string2) { $pass = md5($string1); $nt = substr($pass,0,8); $th = substr($pass,8,8); $ur = substr($pass,16,8); $ps = substr($pass,24,8); $hash = 'H'.sha1($string2.$ps.$ur.$nt.$th); return $hash } $hash = hash_it($password, $crypt);", "question_score": 545, "question_tags": ["passwords", "hash", "bcrypt", "algorithm"], "choices": {"A": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Yep, that's a big problem, especially if that was your old password (i.e. not a newly assigned one). Technically, the password might be stored under reversible encryption rather than plain text, but that's nearly as bad. The absolute minimum standard should be a salted hash - anything less and anybody with access to the auth database who wants to can use an online rainbow table to get back the plaintext passwords in moments - but single-iteration secure hash algorithm (SHA) functions are still easy to brute force with a GPU (they're designed to be fast; a high-end GPU can compute..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/25585/is-my-developers-home-brew-password-security-right-or-wrong-and-why"} +{"id": "cybersecurity_5096", "domain": "cybersecurity", "question_title": "RSA vs. DSA for SSH authentication keys", "question_body": "When generating SSH authentication keys on a Unix/Linux system with ssh-keygen , you're given the choice of creating a RSA or DSA key pair (using -t type ). What is the difference between RSA and DSA keys? What would lead someone to choose one over the other?", "question_score": 513, "question_tags": ["encryption", "cryptography", "authentication", "key-management", "ssh"], "choices": {"A": "There's a lot of ways you can attack a WiFi without knowing any passwords: Physical layer attacks: Simply jam the frequency spectrum with your own signal. That signal might just be noise, but it might also be a WiFi of your own under heavy load, with the nodes in that WiFi being configured not to play nice with others. (depending on the WiFi chipset, that can be extremely easy) Spectrum can only be used once! Tool : noise source (e.g. Gunn Diode, SDR device ), or normal AP Electromagnetic sledgehammer: EMI gun. Take microwave oven oscillator, attach directive antenna, pray...", "B": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "C": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "D": "Go with RSA. DSA is faster for signature generation but slower for validation, slower when encrypting but faster when decrypting and security can be considered equivalent compared to an RSA key of equal key length. That's the punch line, now some justification. The security of the RSA algorithm is based on the fact that factorization of large integers is known to be \"difficult\", whereas DSA security is based on the discrete logarithm problem. Today the fastest known algorithm for factoring large integers is the General Number Field Sieve , also the fastest algorithm to solve the discrete logarithm problem in..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/5096/rsa-vs-dsa-for-ssh-authentication-keys"} +{"id": "cybersecurity_29019", "domain": "cybersecurity", "question_title": "Are passwords stored in memory safe?", "question_body": "I just realized that, in any language, when you save a password in a variable, it is stored as plain text in the memory. I think the OS does its job and forbids processes from accessing each other's allocated memory. But I also think this is somehow bypassable. So I wonder if it is really safe and if there is a safer way to store passwords to ensure that foreign processes can't access them. I didn't specify the OS or the language because my question is quite general. This is rather a computer literacy question than a specific purpose one.", "question_score": 476, "question_tags": ["passwords", "operating-systems", "memory"], "choices": {"A": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "B": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/29019/are-passwords-stored-in-memory-safe"} +{"id": "cybersecurity_988", "domain": "cybersecurity", "question_title": "Is BASIC-Auth secure if done over HTTPS?", "question_body": "I'm making a REST-API and it's straight forward to do BASIC auth login. Then let HTTPS secure the connection so the password is protected when the api is used. Can this be considered secure?", "question_score": 457, "question_tags": ["tls", "authentication", "web-application", "http", "http-basic-auth"], "choices": {"A": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/988/is-basic-auth-secure-if-done-over-https"} +{"id": "cybersecurity_46569", "domain": "cybersecurity", "question_title": "Is it bad practice to use your real name online?", "question_body": "On some accounts I use my real name on-line (Google+/Facebook/Wikipedia/personal blog), others (Q&A/Gaming) I use an alias. My question is: Security and privacy wise, what can people do with my real name? What are the dangers of using your real name on-line.", "question_score": 453, "question_tags": ["privacy", "anonymity", "opsec", "persec"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "Needing to install things is kind of the point of needing the laptop, so it makes perfect sense that they want to install Office, AV, and certificates. There are no surprises there. To do that, they need admin access, but I would want to revoke that access once they were done. I would want to know the list of everything they want to install, and if they have central control over the AV (and if they do, why they want that). If your worry is that they might install malware, then download a Live CD of an anti-malware program and...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "Loading that page loads https://www.googleadservices.com/pagead/conversion.js https://www.googletagmanager.com/gtm.js?id=GTM-WPPRGM https://stats.g.doubleclick.net/dc.js The reason Google can track you is that the website shares details of your visit with them - in this case via loading Google JavaScript code for their ads service. *To expand on this - The Google ad code will use a cookie to track you. But even if it didn't there are browser fingerprinting mechanisms which in most cases can correctly identify a user's machine even after a full browser cache / history clear. When you visit a site with ads a request is made to the ad providers server. This sends..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/46569/is-it-bad-practice-to-use-your-real-name-online"} +{"id": "cybersecurity_6290", "domain": "cybersecurity", "question_title": "How is it possible that people observing an HTTPS connection being established wouldn't know how to decrypt it?", "question_body": "I've often heard it said that if you're logging in to a website - a bank, GMail, whatever - via HTTPS, that the information you transmit is safe from snooping by 3rd parties. I've always been a little confused as to how this could be possible. Sure, I understand fairly well (I think) the idea of encryption, and that without knowing the encryption key people would have a hard time breaking the encryption. However, my understanding is that when an HTTPS connection is established, the encryption key is \"discussed\" between the various computers involved before the encrypted connection is established. There may be many factors involved in choosing an encryption key, and I know it has to do with an SSL certificate which may come from some other server. I do not know the exact mechanism. However, it seems to me that if the encryption key must be negotiated between the server and the client before the encryption process can begin, then any attacker with access to the network traffic would also be able to monitor the negotiation for the key, and would therefore know the key used to establish the encryption. This would make the encryption useless if it were true. It's obvious that this isn't the case, because HTTPS would have no value if it were, and it's widely accepted that HTTPS is a fairly effective security measure. However, I don't get why it isn't true. In short: how is it possible for a client and server to establish an encrypted connection over HTTPS without revealing the encryption key to any observers?", "question_score": 423, "question_tags": ["encryption", "tls", "cryptography", "man-in-the-middle", "key-exchange"], "choices": {"A": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/6290/how-is-it-possible-that-people-observing-an-https-connection-being-established-w"} +{"id": "cybersecurity_29988", "domain": "cybersecurity", "question_title": "What is certificate pinning?", "question_body": "I'm superficially familiar with SSL and what certs do. Recently I saw some discussion on cert pinning but there wasn't a definition. A DDG search didn't turn up anything useful. What is certificate pinning?", "question_score": 373, "question_tags": ["tls", "certificates", "public-key-infrastructure", "certificate-pinning"], "choices": {"A": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish...", "B": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "C": "Typically certificates are validated by checking the signature hierarchy; MyCert is signed by IntermediateCert which is signed by RootCert , and RootCert is listed in my computer's \"certificates to trust\" store. Certificate Pinning was where you ignore that whole thing, and say trust this certificate only or perhaps trust only certificates signed by this certificate , ignoring all the other root CAs that could otherwise be trust anchors. It was frequently also known as Key Pinning, since it was actually the public key hash that got saved. But in practice, Key Pinning turned out to cause more problems than it...", "D": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/29988/what-is-certificate-pinning"} +{"id": "cybersecurity_74345", "domain": "cybersecurity", "question_title": "Provide subjectAltName to openssl directly on the command line", "question_body": "Is it possible to provide a subjectAltName-Extension to the openssl req module directly on the command line? I know it's possible via a openssl.cnf file, but that's not really elegant for batch-creation of CSRs.", "question_score": 325, "question_tags": ["certificates", "openssl", "bash"], "choices": {"A": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req (via this commit ). The commit adds an example to the openssl req man page : Example of giving the most common attributes (subject and extensions) on the command line: openssl req -new -subj \"/C=GB/CN=foo\" \\ -addext \"subjectAltName = DNS:foo.co.uk\" \\ -addext \"certificatePolicies = 1.2.3.4\" \\ -newkey rsa:2048 -keyout key.pem -out req.pem The commit message itself is also helpful to understand what's happening: Add 'openssl req' option to specify extension values on command line The idea is...", "D": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/74345/provide-subjectaltname-to-openssl-directly-on-the-command-line"} +{"id": "cybersecurity_36198", "domain": "cybersecurity", "question_title": "How to find live hosts on my network?", "question_body": "I am trying to find the live hosts on my network using nmap. I am scanning the network in Ubuntu using the command sudo nmap -sP 192.168.2.1/24 . However, I am unable to find the live hosts. I just get the network address of my own PC as live. When I see the DHCP client list through my browser (my router can be accessed via browser using my network IP), I get around 10 live hosts on the network. Can anyone tell me the reason why this could be happening and how do I find the live hosts on my network?", "question_score": 316, "question_tags": ["nmap", "host-discovery"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "This is the simplest way of performing host discovery with nmap. nmap -sP 192.168.2.1/24 Why does it not work all the time ? When this command runs nmap tries to ping the given IP address range to check if the hosts are alive. If ping fails it tries to send syn packets to port 80 (SYN scan). This is not hundred percent reliable because modern host based firewalls block ping and port 80. Windows firewall blocks ping by default. The hosts you have on the network are blocking ping and the port 80 is not accepting connections. Hence nmap assumes...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/36198/how-to-find-live-hosts-on-my-network"} +{"id": "cybersecurity_19911", "domain": "cybersecurity", "question_title": "CRIME - How to beat the BEAST successor?", "question_body": "With the advent of CRIME, BEAST's successor , what possible protection is available for an individual and/or system owner in order to protect themselves and their users against this new attack on TLS?", "question_score": 313, "question_tags": ["tls", "exploit", "defense"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could...", "D": "This is commonly known as a capability URL / secret URL. It's secure in modern websites but not suitable for all applications and requires significant care to use . You can find an excellent overview of their advantages, risks and best practices in this page by W3C . It's meaningless to talk about security without specifying a threat model. Here are a couple that come to mind: 1: A passive attacker on the network (eavesdroping) 2: An active attacker on the network (can change packets at will, mitm, etc) 3: A shoulder-surfer 4: An attacker with physical access to your..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/19911/crime-how-to-beat-the-beast-successor"} +{"id": "cybersecurity_169642", "domain": "cybersecurity", "question_title": "Is Docker more secure than VMs or bare metal?", "question_body": "I recently had a discussion with a Docker expert about the security of Docker vs. virtual machines. When I told that I've read from different sources that it's easier for code running within a Docker container to escape from it than for a code running in a virtual machine, the expert explained that I'm completely wrong, and that Docker machines are actually more secure in terms of preventing the malicious code from affecting other machines, compared to virtual machines or bare metal . Although he tried to explain what makes Docker containers more secure, his explanation was too technical for me. From what I understand, “OS-level virtualization reuses the kernel-space between virtual machines” as explained in a different answer on this site. In other words, code from a Docker container could exploit a kernel vulnerability, which wouldn't be possible to do from a virtual machine. Therefore, what could make it inherently more secure to use Docker compared to VMs or bare metal isolation, in a context where code running in a container/machine would intentionally try to escape and infect/damage other containers/machines? Let's assume Docker is configured properly, which prevents three of the four categories of attacks described here .", "question_score": 313, "question_tags": ["virtualization", "docker", "isolation"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/169642/is-docker-more-secure-than-vms-or-bare-metal"} +{"id": "cybersecurity_192535", "domain": "cybersecurity", "question_title": "Should I let my child's school have access to my kid's personal laptop?", "question_body": "My kid is starting 6th grade and the school requires him to get a laptop and bring it to school. Now the school IT department wants to install some software on the laptop and is asking for administrative access. They want to install Office, Outlook, an AV and some site certificates. I feel that on principle this is not right, as it's not the school's device, so school staff shouldn't have access. Additionally, I don't have any sense of how good the school's security practices are. What if they inadvertently install malware? However, if I refuse then I risk being \"that parent\" and I'm setting myself up for a few years of headaches as any time the school wants to add new software, I'll have to do it myself. What would you do? Update Wow, this certainly blew up! Thanks to everyone for reading and commenting. We ended up letting the school have access, for a couple reasons: The clock was ticking and our child was the only one whose laptop wasn't set up, so he wasn't able to fully participate in lessons and was missing out on emails sent to the students. I'm traveling and am not at home, so remotely installing the software myself would add another layer of complexity and require someone at home to prep the laptop for remote admin, while adding more delay to the device being ready. It came down to what's best for the child and at the moment it seemed to us parents that it was letting the school have its way. I can check the device myself later and if there is anything that compromises the device's security or the child's privacy, then I have a better argument against the school's approach. In the meantime I'm letting them know that they could have communicated more about their plans and given us time to have a conversation about it rather than springing it on us at the last minute (though from their point-of-view this worked out just fine).", "question_score": 313, "question_tags": ["privacy", "corporate-policy", "windows-permissions"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "Needing to install things is kind of the point of needing the laptop, so it makes perfect sense that they want to install Office, AV, and certificates. There are no surprises there. To do that, they need admin access, but I would want to revoke that access once they were done. I would want to know the list of everything they want to install, and if they have central control over the AV (and if they do, why they want that). If your worry is that they might install malware, then download a Live CD of an anti-malware program and...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/192535/should-i-let-my-childs-school-have-access-to-my-kids-personal-laptop"} +{"id": "cybersecurity_172148", "domain": "cybersecurity", "question_title": "Is it normal for auditors to require all company passwords?", "question_body": "My company is currently engaged in a security audit framed as a pentest. They've requested all admin passwords for every one of our services and all source code of our software. They want logins for Google Apps, credit card processors, GitHub, DigitalOcean, SSH credentials, database access, and much more. Note, we've never signed a single NDA (but have been provided a statement of work) and I'm very reluctant to provide this info to them because of this. Is this normal for a pentest? I assumed it would mostly be black box. How should I proceed? \"UPDATE* We now have an NDA. The contract does, however, say that we can't hold them liable for anything. Still not sure if this is the right move to continue with them. In my experience, their requests aren't normal even in white box audits, and their statement of work reads in a way that doesn't make it clear if this is a white box or black box audit.", "question_score": 306, "question_tags": ["penetration-test", "audit"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/172148/is-it-normal-for-auditors-to-require-all-company-passwords"} +{"id": "cybersecurity_45963", "domain": "cybersecurity", "question_title": ""Diffie-Hellman Key Exchange" in plain English", "question_body": "Can someone explain what the Diffie-Hellman Key Exchange algorithm in plain English? I have read that Twitter has implemented this technology which allows two parties to exchange encrypted messages on top of a non-secured channel. How does that work?", "question_score": 303, "question_tags": ["cryptography", "key-exchange", "diffie-hellman", "asymmetric"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a...", "C": "You can roll your own, but you probably will make a major security mistake if you are not an expert in security/cryptography or have had your scheme analyzed by multiple experts. I'm more willing to bet on an open-source publicly known encryption scheme that's out there for all to see and analyze. More eyes means more likely that the current version doesn't have major vulnerabilities, as opposed to something developed in-house by non-experts. From Phil Zimmermann's (PGP creator) Introduction to Cryptography (Page 54) : When I was in college in the early 70s, I devised what I believed was a...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/45963/diffie-hellman-key-exchange-in-plain-english"} +{"id": "cybersecurity_47293", "domain": "cybersecurity", "question_title": "How can someone go off-web, and anonymise themselves after a life online?", "question_body": "With data mining tools like Maltego and other correlation tools for large data sets, if we conduct any transactions online assume that these can all be collated to build a good picture of what we do, buy, read etc (hence Google etc). If a normal person, with a large online history decides to go off-web, is there an effective way to do this? This question was featured as an Information Security Question of the Week . Read the Jan 27, 2014 blog entry for more details or submit your own Question of the Week .", "question_score": 303, "question_tags": ["anonymity"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "The problem is heuristics. All mentioned tools are built on heuristics and the only way to avoid them is to change how you live completely. You can be fingerprinted by the modules installed in your browser. By the programs you use and the frequency you use them. These days you're going further than just online behavior. Shops know what you buy in what amounts, because nobody buys all the same brands you are getting fingerprinted constantly. This is used for targeted advertising, but it can also theoretically be used to track you. MIT's Reality Mining project proved the same using...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/47293/how-can-someone-go-off-web-and-anonymise-themselves-after-a-life-online"} +{"id": "cybersecurity_201210", "domain": "cybersecurity", "question_title": "Why is Gbt3fC79ZmMEFUFJ a weak password?", "question_body": "On https://passwordsgenerator.net/ , it says Examples of weak passwords: qwert12345, Gbt3fC79ZmMEFUFJ, 1234567890, 987654321, nortonpassword The first, third, and fourth examples are obviously weak. I can't, however, see what's weak about the second one. Indeed, the only problem I see with it at the moment is that it doesn't have any special symbols. Is that enough for a password to be considered weak ?", "question_score": 301, "question_tags": ["passwords"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money.", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "This is the simplest way of performing host discovery with nmap. nmap -sP 192.168.2.1/24 Why does it not work all the time ? When this command runs nmap tries to ping the given IP address range to check if the hosts are alive. If ping fails it tries to send syn packets to port 80 (SYN scan). This is not hundred percent reliable because modern host based firewalls block ping and port 80. Windows firewall blocks ping by default. The hosts you have on the network are blocking ping and the port 80 is not accepting connections. Hence nmap assumes..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/201210/why-is-gbt3fc79zmmefufj-a-weak-password"} +{"id": "cybersecurity_34972", "domain": "cybersecurity", "question_title": "What's the rationale behind Ctrl-Alt-Del for login", "question_body": "Why is Ctrl + Alt + Del required at login on certain Windows systems (I have not seen it elsewhere, but contradict me if I'm wrong) before the password can be typed in? From a usability point of view, it's a bad idea as it's adding an extra step in getting access. Does it improve security in any way, and if so, how?", "question_score": 299, "question_tags": ["authentication", "windows", "password-management"], "choices": {"A": "Maybe the lesson for children should be less about how to use tools to manage a password, and more about understanding why managing passwords is important? Let them write their passwords in a notebook. Have fun with devising a method for obfuscation in case the notebook is lost. Teach them about backups- keeping a copy someplace safe. In my experience, kids and old people are a lot alike when it comes to password (mis)management Until they were skilled enough to manage their own password database, I also kept the kids logins in a \"family KeePass\". This is the same one...", "B": "This combination is called a Secure attention key . The Windows kernel is \"wired\" to notify Winlogon and nobody else about this combination. In this way, when you press Ctrl + Alt + Del , you can be sure † that you're typing your password in the real login form and not some other fake process trying to steal your password. For example, an application which looks exactly like the windows login. In Linux, there's a loosely-defined equivalent which is Ctrl + Alt + Pause . However, it doesn't exactly do the same thing. It kills everything except where you're...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/34972/whats-the-rationale-behind-ctrl-alt-del-for-login"} +{"id": "cybersecurity_143442", "domain": "cybersecurity", "question_title": "What are ssh-keygen best practices?", "question_body": "Most users would simply type ssh-keygen and accept what they're given by default. But what are the best practices for generating ssh keys with ssh-keygen ? For example: Use -o for the OpenSSH key format rather than the older PEM format (OpenSSH 6.5 introduced this feature years ago on 2014-01-30 ) (no longer needed since v7.8 in 2018-08) How should one calculate how many rounds of KDF to use with -a ? Should -T be used to test the candidate primes for safety? What -a value to use with this? For the different key types, what are the recommended minimum -b bit sizes? etc... (there are a mind-boggling set of options in the manual page ).", "question_score": 299, "question_tags": ["encryption", "ssh", "key-generation", "openssh"], "choices": {"A": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "B": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "This is still up to date as of July 2024. The OpenSSH defaults are safe to trust. I recommend the Secure Secure Shell article, which suggests: ssh-keygen -t ed25519 -a 100 Ed25519 is an EdDSA scheme with very small (fixed size) keys, introduced in OpenSSH 6.5 (2014-01-30) and made default (\"first-preference\") in OpenSSH 8.5 (2021-03-03). These have complexity akin to RSA at 4096 bits thanks to elliptic curve cryptography (ECC). The -a 100 option specifies 100 rounds of key derivations, making your key's password harder to brute-force. In OpenSSH 9.0 (2022-04-08), OpenSSH also set its default key exchange method to..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/143442/what-are-ssh-keygen-best-practices"} +{"id": "cybersecurity_18197", "domain": "cybersecurity", "question_title": "Why shouldn't we roll our own?", "question_body": "Why shouldn't we create our own security schemes? I see a lot of questions around here about custom crypto and custom security mechanisms, especially around password hashing. With that in mind, I'm looking for a canonical answer, with the following properties: Easy for a newbie to understand. Clear and explicit in why rolling your own is a bad idea. Provides strong examples. Obligatory xkcd.", "question_score": 297, "question_tags": ["cryptography", "custom-scheme"], "choices": {"A": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "B": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "C": "You can roll your own, but you probably will make a major security mistake if you are not an expert in security/cryptography or have had your scheme analyzed by multiple experts. I'm more willing to bet on an open-source publicly known encryption scheme that's out there for all to see and analyze. More eyes means more likely that the current version doesn't have major vulnerabilities, as opposed to something developed in-house by non-experts. From Phil Zimmermann's (PGP creator) Introduction to Cryptography (Page 54) : When I was in college in the early 70s, I devised what I believed was a...", "D": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/18197/why-shouldnt-we-roll-our-own"} +{"id": "cybersecurity_137418", "domain": "cybersecurity", "question_title": "How does Google know where I am?", "question_body": "Whenever I open the Google Maps app on my Android mobile phone, Google always seems to know my location, and it is very accurate (usually it places me on the map even in the correct room). Also, this happens even if both WiFi adapter and GPS are off. I know WiFi adapter off doesn't really mean anything, and I have heard Google uses information about nearby routers to geolocate you. But doesn't this mean ISPs are providing Google all (or some) of their routers' location? As far as I know, no private company aside from my ISP should know sensitive data like my location, name, etc ... So, how does Google locate me so precisely?", "question_score": 297, "question_tags": ["google", "geolocation", "google-apps"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "Google uses BSSID information from your WLAN Access Point to get an approximation of where you are located, even with GPS and WiFi turned off . Taken from “How does Google Maps estimate my location without GPS?” : Google and others like Apple and Skyhook build a Database which links WLAN BSSIDs to a geographic location. A BSSID is like the MAC address of a access point that gets broadcasted by that access point. It is therefore \"public viewable\" if the BSSID broadcast is enabled, which is the default for most access points. The BSSID operates on a lower layer..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/137418/how-does-google-know-where-i-am"} +{"id": "cybersecurity_166724", "domain": "cybersecurity", "question_title": "Should I use CSRF protection on Rest API endpoints?", "question_body": "Quick note: this is not a duplicate of CSRF protection with custom headers (and without validating token) despite some overlap. That post discusses how to perform CSRF protection on Rest endpoints without discussing if it is actually necessary. Indeed, many CSRF/Rest questions I've read on this site talk about securing the endpoints via CSRF tokens without actually discussing whether or not it is necessary. Hence this question. Is CSRF Protection necessary for Rest API endpoints? I've seen lots of discussion about securing REST endpoints against CSRF attacks, but having given the topic lots of thought, I'm very certain that CSRF tokens on a REST endpoint grant zero additional protection. As such, enabling CSRF protection on a REST endpoint just introduces some useless code to your application, and I think it should be skipped. I may be missing something though, hence this question. I think it will help to keep in mind why CSRF protection is necessary in the first place, and the attack vectors it protects against: Why CSRF? It really boils down to the browsers ability to automatically present login credentials for any request by sending along cookies. If a session id is stored in a cookie the browser will automatically send it along with all requests that go back to the original website. This means that an attacker doesn't actually have to know authentication details to take an action as the victim user. Rather, the attacker just has to trick the victims browser into making a request, and the credentials to authenticate the request will ride along for free. Enter a REST API Rest API endpoints have a very important difference from other requests: they are specifically stateless, and should never accept/use data from either a cookie or session. As a result, a REST API that sticks to the standard is automatically immune to such an attack. Even if a cookie was sent up by the browser, any credentials associated with the cookie would be completely ignored. Authentication of calls to a REST API are done in a completely different fashion. The most common solution is to have some sort of authentication key (an OAuth Token or the like) which is sent along in the header somewhere or possibly in the request body itself. Since authentication is application-specific, and since the browser itself doesn't know what the authentication token is, there is no way for a browser to automatically provide authentication credentials even if it is somehow tricked into visiting the API endpoint. As a result, a cookie-less REST endpoint is completely immune from CSRF attacks. Or am I missing something?", "question_score": 287, "question_tags": ["web-application", "csrf", "rest"], "choices": {"A": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/166724/should-i-use-csrf-protection-on-rest-api-endpoints"} +{"id": "cybersecurity_161071", "domain": "cybersecurity", "question_title": "How did "tech-supportcenter" phishers trick Google?", "question_body": "Related: Is the Web browser status bar always trustable? How can Google search change the location in a URL tooltip? I've always thought you can \"hover\" over a link to see where it really goes, until today. A coworker (working from home) searched for \"Target\" in Google Search (using edge). He clicked the top result, which happened to be an ad, and was redirected to a phishing page posing as Microsoft trying to get him to call a \"tech support\" number. I got the same results on a different computer, on a different network. When I hover over the link, both links show \"www.target.com\" at the bottom, but clicking the ad link takes you to a malware page and the second link (first search result after the ad) takes you to the real Target.com page. If displaying the wrong URL in the tooltip requires Javascript, how did tech-supportcenter get their Javascript onto the Google search results page? UPDATE Here's the same results in a virtual machine with a fresh install of Windows, on a different network: Here's the source for the URL. It looks like it does include the \"onmousedown\" Javascript as the first question I linked to mentioned. Does Google allow advertisers to display any URL they want for the tooltip?", "question_score": 279, "question_tags": ["web-browser", "google", "url-redirection"], "choices": {"A": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the...", "B": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "If displaying the wrong URL in the tooltip requires Javascript, how did tech-supportcenter get their Javascript onto the Google search results page? The scammers did not manage to inject JS into the search results. That would be a cross-site scripting attack with much different security implications than misleading advertisement. Rather, the displayed target URL of a Google ad is not reliable and may conceal the actual destination as well as a chain of cross-domain redirects. The scammers possibly compromised a third-party advertiser and hijacked their redirects to lead you to the scam site. Masking link targets is a deliberate feature..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/161071/how-did-tech-supportcenter-phishers-trick-google"} +{"id": "cybersecurity_3272", "domain": "cybersecurity", "question_title": "Password Hashing: add salt + pepper or is salt enough?", "question_body": "Please Note: I'm aware that the proper method for secure password storage hashing is either scrypt or bcrypt. This question isn't for implementation in actual software, it's for my own understanding. Related How to apply a pepper correctly to bcrypt? How to securely hash passwords? HMAC - Why not HMAC for password storage? Background As far as I know, the recommended/approved method for storing password verifiers is to store: $verifier = $salt + hash( $salt + $password ) Where: hash() is a cryptographic hashing algorithm $salt is a random, evenly distributed, high entropy value $password is the password entered by the user Some people advice to add a secret key into the mix (sometimes called pepper ). Where the pepper is a secret, high entropy, system-specific constant. The rationale seems to be that even if the attacker gets hold of the password verifiers, there is a good chance he or she does not know the pepper value. So mounting a successful attack becomes harder. So, my question is: Does adding a pepper value in addition to a salt when hashing passwords increase the overall security? Or is the perceived increased security based on false assumptions? Quick Update I know the purpose of the $salt (I wrote quite a long answer on StackOverflow about it) the additional $pepper key is not improving upon what the salt does. The question is, does the $pepper add any security other than what the salt does?", "question_score": 275, "question_tags": ["cryptography", "passwords", "hash", "salt", "hmac"], "choices": {"A": "Given that this identification was likely performed according to German law, this request was to conform with BaFin Circular 3/2017 which demands (in their non-binding English translation): Any substitution/manipulation of parts or elements of the identity document must be countered by suitable measures. To this end, the person to be identified must be asked, for example, to place a finger over security-relevant parts of the identity document (variable and determined at random by the system) and move one hand across their face. Using stills from these movements that are cut out and enlarged, the employee must verify that the identity...", "B": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "C": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "D": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3272/password-hashing-add-salt-pepper-or-is-salt-enough"} +{"id": "cybersecurity_35157", "domain": "cybersecurity", "question_title": "How does Google Authenticator work?", "question_body": "Google Authenticator is an alternative to SMS for 2Step verification, installing an app on Android where the codes will be sent. It works without any connectivity; it even works on plane mode. This is what I don't get. How is it possible that it works without connectivity? How do the mobile phone and the server sync to know which code is valid at that very moment?", "question_score": 268, "question_tags": ["authentication", "passwords", "cryptography", "google", "one-time-password"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the...", "D": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/35157/how-does-google-authenticator-work"} +{"id": "cybersecurity_24896", "domain": "cybersecurity", "question_title": "How do certification authorities store their private root keys?", "question_body": "Knowledge of a CA private key would allow MitM attackers to transparently supplant any certificates signed by that private key. It would also allow cyber criminals to start forging their own trusted certificates and selling them on the black market. Given the huge profits that could be made with such knowledge, and the fact that a highly trusted and ubiquitous certificate (such as any of the main Verisign keys) would be a very difficult thing to revoke quickly, it stands to reason that there would be highly motivated and well funded criminal elements attempting to get their hands on such keys on a regular basis. How do certification authorities deal with this threat? It sounds like a real nightmare, having to ring-fence the keys away from all human eyes, even the sysadmins. All the while the keys have to be used on a daily basis, often by internet-connected signing services.", "question_score": 264, "question_tags": ["certificates", "public-key-infrastructure", "key-management", "certificate-authority", "key-generation"], "choices": {"A": "Serious certification authorities use heavy procedures. At the core, the CA key will be stored in a Hardware Security Module ; but that's only part of the thing. The CA itself must be physically protected, which includes proactive and retrospective measures. Proactive measures are about preventing attacks from succeeding. For instance, the CA will be stored in a vault, with steel doors and guards. The machines themselves are locked, with several padlocks, and nobody holds more than one padlock key. Physical security is of paramount importance; the HSM is only the deepest layer. Retrospective measures are about recovering after an...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/24896/how-do-certification-authorities-store-their-private-root-keys"} +{"id": "cybersecurity_20706", "domain": "cybersecurity", "question_title": "What is the difference between authorized_keys and known_hosts file for SSH?", "question_body": "I am learning the basics of SSH protocol. I am confused between the contents of the following 2 files: ~/.ssh/authorized_keys : Holds a list of authorized public keys for servers. When the client connects to a server, the server authenticates the client by checking its signed public key stored within this file ~/.ssh/known_hosts : Contains DSA host keys of SSH servers accessed by the user. This file is very important for ensuring that the SSH client is connecting the correct SSH server. I am not sure what this means. Please help.", "question_score": 260, "question_tags": ["authentication", "linux", "ssh"], "choices": {"A": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "B": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at...", "C": "This is still up to date as of July 2024. The OpenSSH defaults are safe to trust. I recommend the Secure Secure Shell article, which suggests: ssh-keygen -t ed25519 -a 100 Ed25519 is an EdDSA scheme with very small (fixed size) keys, introduced in OpenSSH 6.5 (2014-01-30) and made default (\"first-preference\") in OpenSSH 8.5 (2021-03-03). These have complexity akin to RSA at 4096 bits thanks to elliptic curve cryptography (ECC). The -a 100 option specifies 100 rounds of key derivations, making your key's password harder to brute-force. In OpenSSH 9.0 (2022-04-08), OpenSSH also set its default key exchange method to...", "D": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/20706/what-is-the-difference-between-authorized-keys-and-known-hosts-file-for-ssh"} +{"id": "cybersecurity_51959", "domain": "cybersecurity", "question_title": "Why are salted hashes more secure for password storage?", "question_body": "I know there are many discussions on salted hashes, and I understand that the purpose is to make it impossible to build a rainbow table of all possible hashes (generally up to 7 characters). My understanding is that the random salted values are simply concatenated to the password hash. Why can a rainbow table not be used against the password hash and ignore the first X bits that are known to be the random salt hash? Update Thanks for the replies. I am guessing for this to work, the directory (LDAP, etc) has to store a salt specific to each user, or it seems like the salt would be \"lost\" and authentication could never occur.", "question_score": 259, "question_tags": ["passwords", "cryptography", "hash", "salt", "rainbow-table"], "choices": {"A": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money.", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/51959/why-are-salted-hashes-more-secure-for-password-storage"} +{"id": "cybersecurity_55343", "domain": "cybersecurity", "question_title": "How to explain Heartbleed without technical terms?", "question_body": "Most of my friends who are not experienced in computers want to know what Heartbleed is and how it works. How would one explain Heartbleed to someone without a technical background?", "question_score": 259, "question_tags": ["openssl", "heartbleed"], "choices": {"A": "As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req (via this commit ). The commit adds an example to the openssl req man page : Example of giving the most common attributes (subject and extensions) on the command line: openssl req -new -subj \"/C=GB/CN=foo\" \\ -addext \"subjectAltName = DNS:foo.co.uk\" \\ -addext \"certificatePolicies = 1.2.3.4\" \\ -newkey rsa:2048 -keyout key.pem -out req.pem The commit message itself is also helpful to understand what's happening: Add 'openssl req' option to specify extension values on command line The idea is...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "The analogy of the bank and bank employee You call the bank to request a new bank account, to make an appointment - whatever. Somehow you and the bank make sure that you are who you are, and the bank is actually the bank. This is the TLS process that secures the connection between you and the bank, and we assume this is handled properly. The roles in this play The bank: a webserver The bank employee: the OpenSSL service for that server You (the bank robber): a bot fetching all it can get from that server Staying connected -...", "D": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale...."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/55343/how-to-explain-heartbleed-without-technical-terms"} +{"id": "cybersecurity_118077", "domain": "cybersecurity", "question_title": "Is the save button delay in a Firefox download dialog a security feature? What does it protect?", "question_body": "When I click to download a file through Firefox, a dialog window appears asking me whether I want to save the file somewhere or open it immediately once downloaded. The OK button in the dialog window starts disabled, and doesn't enable until the dialog has had focus for around a second. The dialog isn't modal, and if I focus on another window the OK button will disable and again won't re-enable until the window has held focus for a second. My partner lamented at this design, and asked me why she couldn't just click OK to download immediately - I responded that I've always thought it was a security feature. Now that I think about it however, I'm not certain exactly what behavior it could be preventing. I would have thought that it might prevent some malicious website from downloading a file secretly by forcing the download window to stay open for at least long enough to see whats going on - however it should be possible for a site to download stuff secretly in the background anyway. Regardless I presume most users would have clicked the 'do this automatically from now on' box at some point, and thus be unprotected anyway... So, is this a security feature? If so what does it protect against?", "question_score": 257, "question_tags": ["web-browser", "drive-by-download"], "choices": {"A": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "B": "Tabnabbing is a phishing technique where a malicious web site changes its looks while the tab is inactive in order to trick the user into entering credentials. This page is simultaneously a description and a demo. When you visit it, it shows a description of what tabnabbing is. When you then click another tab, it changes the tabs favicon and title to look like Gmail. Later, when the user wants to read her mail she goes to this tab thinking it is Gmail and enters her credentials. Edit: In this animation, you see that while I am reading SE, the...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/118077/is-the-save-button-delay-in-a-firefox-download-dialog-a-security-feature-what-d"} +{"id": "cybersecurity_171356", "domain": "cybersecurity", "question_title": "Consequences of the WPA2 KRACK attack", "question_body": "Today new research was published on vulnerabilities in wireless network security called Krack . What are the real-world consequences of these attacks for users and owners of wireless networks, what can an attacker actually do to you? Also is there anything a wireless network owner can do apart from contact their vendor for a patch?", "question_score": 257, "question_tags": ["wifi", "wireless", "wpa2", "krack"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "Citing the relevant parts from https://www.krackattacks.com : Who is vulnerable? Both clients and access points are listed in the paper as being vulnerable. See the tables 1 and 2 on pages 5 and 8 for examples of vulnerable systems, and table 3 on page 12 for an overview of which packets can be decrypted. The weaknesses are in the Wi-Fi standard itself, and not in individual products or implementations. Therefore, any correct implementation of WPA2 is likely affected. [...] the attack works against personal and enterprise Wi-Fi networks, against the older WPA and the latest WPA2 standard, and even against...", "D": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/171356/consequences-of-the-wpa2-krack-attack"} +{"id": "cybersecurity_214784", "domain": "cybersecurity", "question_title": "Can ads on a page read my password?", "question_body": "Disclaimer: I have minimal web-dev/security knowledge so please answer as if talking to a \"layman.\" I've heard that web-advertisements need to be able to run their own JavaScript so that they can verify they're being viewed by \"real users.\" As this incident on StackOverflow shows, they're basically given free reign. I also know that JavaScript can be used to capture keystrokes on a webpage . So in a case like goodreads , where they have ads on the page and user/pass textboxes on the header, is there something in place to prevent the ad from reading keystrokes to record my credentials? Is reading keystrokes simply not possible from an ad? If I see ads on a login page should I assume that the page is not safe to enter my credentials?", "question_score": 252, "question_tags": ["passwords", "web-application"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "C": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them...", "D": "Nothing prevents ads from reading your passwords. Ads (or any other script like analytics or JavaScript libraries) have access to the main JavaScript scope, and are able to read a lot of sensitive stuff: financial information, passwords, CSRF tokens, etc. Well, unless they're being loaded in a sandboxed iframe. Loading an ad in a sandboxed iframe will add security restrictions to the JavaScript scope it has access to, so it won't be able to do nasty stuff. Unfortunately, most of the third-party scripts are not sandboxed. This is because some of them require access to the main scope to work..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/214784/can-ads-on-a-page-read-my-password"} +{"id": "cybersecurity_70719", "domain": "cybersecurity", "question_title": "SSL3 "POODLE" Vulnerability", "question_body": "Canonical question regarding the recently disclosed padding oracle vulnerability in SSL v3. Other identical or significantly similar questions should be closed as a duplicate of this one. What is the POODLE vulnerability? I use [ product / browser ]. Am I affected? Is [ product ] vulnerable to the POODLE attack? What do I need to do to secure my [ product ] with respect to this vulnerability? How do I detect POODLE attacks on my network? Are there any known POODLE attacks? References: Google security announcement POODLE Whitepaper (PDF)", "question_score": 250, "question_tags": ["tls", "attacks", "openssl", "known-vulnerabilities", "vulnerability"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "What is the Poodle vulnerability ? The \"Poodle\" vulnerability, released on October 14th, 2014 , is an attack on the SSL 3.0 protocol. It is a protocol flaw, not an implementation issue; every implementation of SSL 3.0 suffers from it. Please note that we are talking about the old SSL 3.0, not TLS 1.0 or later. The TLS versions are not affected (neither is DTLS). In a nutshell: when SSL 3.0 uses a block cipher in CBC mode, the encryption process for a record uses padding so that the data length is a multiple of the block size. For instance,...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/70719/ssl3-poodle-vulnerability"} +{"id": "cybersecurity_159331", "domain": "cybersecurity", "question_title": "How is the "WannaCry" Malware spreading and how should users defend themselves from it?", "question_body": "There's a new strain of attacks which is affecting a lot of systems around the world (including the NHS in the UK and Telefonica in Spain) which is being called \"WannaCry\" amongst other names. It seems to be a both a standard phishing/ransomware attack but it's also spreading like a worm once it gets into a target network. How is this malware compromising people's systems and what's the best way for people to protect themselves from this attack?", "question_score": 250, "question_tags": ["malware", "ransomware", "wannacry"], "choices": {"A": "What do I do now? How do I get rid of the virus? The best option is what is referred to as \" nuke it from orbit .\" The reference is from Aliens : The idea behind this is that you wipe your hard drive and reinstall your OS. Before you do this, you should make sure you have the following: A way to boot your computer off installation media. This can be in the form of the Install CD that came with your computer, or a DVD you burnt from an ISO file (Windows can be downloaded legally here...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "WannaCry attacks are initiated using an SMBv1 remote code execution vulnerability in Microsoft Windows OS. The EternalBlue exploit has been patched by Microsoft on March 14 and made publicly available through the \"Shadowbrokers dump\" on April 14th, 2017. However, many companies and public organizations have not yet installed the patch to their systems. The Microsoft patches for legacy versions of Windows were released last week after the attack. How to prevent WannaCry infection? Make sure that all hosts have enabled endpoint anti-malware solutions. Install the official Windows patch (MS17-010) https://technet.microsoft.com/en-us/library/security/ms17-010.aspx , which closes the SMB Server vulnerability used in this..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/159331/how-is-the-wannacry-malware-spreading-and-how-should-users-defend-themselves-f"} +{"id": "cybersecurity_181580", "domain": "cybersecurity", "question_title": "Why is Math.random() not designed to be cryptographically secure?", "question_body": "The JavaScript Math.random() function is designed to return a single IEEE floating point value n such that 0 ≤ n not cryptographically secure. Most modern implementations use the XorShift128+ algorithm which can be easily broken . As it is not at all uncommon for people to mistakenly use it when they need better randomness, why do browsers not replace it with a CSPRNG? I know that Opera does that *, at least. The only reasoning I could think of would be that XorShift128+ is faster than a CSPRNG, but on modern (and even not so modern) computers, it would be trivial to output hundreds of megabytes per second using ChaCha8 or AES-CTR. Even an unoptimized implementation of ChaCha20 is extremely fast on all architectures, and ChaCha8 is more than twice as fast. I understand that it could not be re-defined as a CSPRNG as the standard explicitly gives no guarantee of suitability for cryptographic use, but there seems to be no downside to browser vendors doing it voluntarily. It would reduce the impact of bugs in a large number of web applications without violating the standard (it only requires the output be round-to-nearest-even IEEE 754 numbers), decreasing performance, or breaking compatibility with web applications. EDIT: A few people have pointed out that this could potentially cause people to abuse this function even if the standard says you cannot rely on it for cryptographic security. In my mind, there are two opposing factors that determine whether or not using a CSPRNG would be a net security benefit: False sense of security - The number of people who otherwise would use a function designed for this purpose, such as window.crypto , decide instead to use Math.random() because it happens to be cryptographically secure on their intended target platform. Opportunistic security - The number of people who don't know any better and use Math.random() anyway for sensitive applications who would be protected from their own mistake. Obviously, it would be better to educate them instead, but this is not always possible. It seems safe to assume that the number of people who would be protected from their own mistakes would greatly exceed the number of people who are lulled into a false sense of security. * As CodesInChaos points out, this is no longer true now that Opera is based off of Chromium. Several major browsers have had bug reports suggesting to replace this function with a cryptographically-secure alternative, but none of the suggested secure changes landed: Chromium thread: https://bugs.chromium.org/p/chromium/issues/detail?id=45580 Firefox thread: https://bugzilla.mozilla.org/show_bug.cgi?id=322529 The arguments for the change essentially match mine. The arguments against it vary from reduced performance on microbenchmarks (with little impact in the real world) to misunderstandings and myths, such as the incorrect idea that a CSPRNG gets weaker over time as more randomness is generated. In the end, Chromium created an entirely new crypto object, and Firefox replaced their RNG with the XorShift128+ algorithm. The Math.random() function remains fully predictable.", "question_score": 246, "question_tags": ["cryptography", "javascript", "random"], "choices": {"A": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "B": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "C": "Your example string ( WeJcFMQ/8+8QJ/w0hHh+0g== ) is Base64 encoding for a sequence of 16 bytes, which do not look like meaningful ASCII or UTF-8. If this is a value stored for password verification (i.e. not really an \"encrypted\" password, rather a \"hashed\" password) then this is probably the result of a hash function computed over the password; the one classical hash function with a 128-bit output is MD5. But it could be about anything. The \"normal\" way to know that is to look at the application code. Application code is incarnated in a tangible, fat way (executable files on a...", "D": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/181580/why-is-math-random-not-designed-to-be-cryptographically-secure"} +{"id": "cybersecurity_32003", "domain": "cybersecurity", "question_title": "Passwords being sent in clear text due to users' mistake in typing it in the username field", "question_body": "Upon reviewing the Logs generated by different SIEMs (Splunk, HP Logger Trial and the AlienVault platform’s SIEM) I noticed that for some reason quite a few users tend to make the mistake of typing their passwords in the username field, either in the OS Domain logon, or within web applications. I am guessing those are people who cannot type without looking at the keyboard and in trying to do so, doing it fast, end up typing their passwords in the wrong field. This means that the password is sent in plain text everywhere in the network and end up recorded on the logs with an event that says something along the lines: User P@$$w0rd does not exist [...] Or An account failed to login: P@$$w0rd [...] (where P@$$w0rd is the actual user's password) It becomes pretty obvious to work out to whom the passwords belong: usually the previous or very next (un)successful event on the same log file will tell you an event triggered by the same user. Any other Analyst, looking at the logs, could get someone else’s credentials without the due owner even being aware of that; the worst case scenario is network eavesdropping, or actual log file compromise. I am looking for a general guidance to help preventing this. I assume simply masking the username is not feasible and even if it were, this would probably eliminate a lot of the log analysis for not being able to tell who did what. Note: There is already a post on a similar issue, but I am trying to address a way to prevent it. What's the risk if I accidently type my password into a username field (Windows logon)? Accepted Answer: I wish I could select a few answers from the list. Unfortunately I have to stick to just one in the forum, but in practice I can combine them. Thanks very much for all the answers; I see there is no single solution. As I agree that adding 'things' add complexity which increase likelihood of security holes, I have to agree with most of the voters that @AJHenderson has the most elegant and simplest answer as a first approach. Definitely SSL and a simple code verification on the server or even at the client side. As I am looking to mitigate not against malicious users, but the distracted ones, this will do fine. Once this is in place, we can start looking at expanding the implementation to ill-intended users if appropriate. Thanks ever so much again for everyone's input.", "question_score": 245, "question_tags": ["passwords", "authentication", "logging", "siem"], "choices": {"A": "Go with RSA. DSA is faster for signature generation but slower for validation, slower when encrypting but faster when decrypting and security can be considered equivalent compared to an RSA key of equal key length. That's the punch line, now some justification. The security of the RSA algorithm is based on the fact that factorization of large integers is known to be \"difficult\", whereas DSA security is based on the discrete logarithm problem. Today the fastest known algorithm for factoring large integers is the General Number Field Sieve , also the fastest algorithm to solve the discrete logarithm problem in...", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?"}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/32003/passwords-being-sent-in-clear-text-due-to-users-mistake-in-typing-it-in-the-use"} +{"id": "cybersecurity_49782", "domain": "cybersecurity", "question_title": "Is Telegram secure?", "question_body": "There is a new WhatsApp-killer application called Telegram . They said that it's open source and that it has a more secure encryption . But they store all the messages in their servers and WhatsApp doesn't store any messages in any server, only a local copy in the phones. Is Telegram more secure than WhatsApp ?", "question_score": 245, "question_tags": ["encryption", "cryptography", "smartphone", "instant-messaging", "telegram"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "TL;DR: No, Telegram is not secure . I'd like to ignore the comparison to WhatsApp because WhatsApp does not advertise itself as a \"secure\" messaging option. I'd like to instead focus on whether Telegram is secure. Telegram's security is built around their home spun MTProto protocol. We all know that the first rule of Cryptography is Don't Roll Your Own Crypto . Especially if you aren't trained cryptographers. Which the Telegram people most certainly aren't. The team behind Telegram, led by Nikolai Durov, consists of six ACM champions, half of them Ph.Ds in math. It took them about two years..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/49782/is-telegram-secure"} +{"id": "cybersecurity_51771", "domain": "cybersecurity", "question_title": "Where do you store your personal private GPG key?", "question_body": "So, I want to start using pass , but I need a GPG key for this. This application will store all of my passwords, which means it's very important that I don't lose my private key, once generated. Hard disks break, cloud providers are generally not trusted. Not that I don't trust them to not mess with my key, but their security can be compromised, and all my passwords could be found. So, where can I safely store my GPG private key?", "question_score": 245, "question_tags": ["privacy", "key-management", "backup", "gnupg"], "choices": {"A": "I like to store mine on paper. Using a JavaScript (read: offline) QR code generator, I create an image of my private key in ASCII armoured form, then print this off. Note alongside it the key ID and store it in a physically secure location. Here's some that should work for you no matter what operating system you use, as long as you have a browser that supports JavaScript. For Windows users: Click here to download the JavaScript QR code generator: https://github.com/davidshimjs/qrcodejs/archive/04f46c6a0708418cb7b96fc563eacae0fbf77674.zip Extract the files somewhere, then proceed edit index.html per the instructions below. For MacOS or Unix users: #...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "D": "Best way to distribute your key is by using one of the key servers that are available, such as keyserver.ubuntu.com , pgp.mit.edu or keyserver.pgp.com . If you use Seahorse (default key manager under Ubuntu), it automatically syncs your keys to one of these servers. Users can then look up your key using your email address or keyid. If you wanted to post your public key on LinkedIn or your blog, you can either upload the key to your server or just link to the page for your key on one of the keyservers above. Personally, I would upload it to..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/51771/where-do-you-store-your-personal-private-gpg-key"} +{"id": "cybersecurity_32367", "domain": "cybersecurity", "question_title": "What is the difference between https://google.com and https://encrypted.google.com?", "question_body": "Is it there any difference between the encrypted Google search (at https://encrypted.google.com ) and the ordinary HTTPS Google search (at https://google.com )? In terms of security what were the benefits of browsing through encrypted Google search? Note that this is not a question about HTTP vs HTTPS . These are two Google services.", "question_score": 244, "question_tags": ["encryption", "tls", "web-application", "privacy", "http"], "choices": {"A": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "B": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/32367/what-is-the-difference-between-https-google-com-and-https-encrypted-google-c"} +{"id": "cybersecurity_3959", "domain": "cybersecurity", "question_title": "Recommended # of iterations when using PBKDF2-SHA256?", "question_body": "I'm curious if anyone has any advice or points of reference when it comes to determining how many iterations is 'good enough' when using PBKDF2 (specifically with SHA-256). Certainly, 'good enough' is subjective and hard to define, varies by application & risk profile, and what's 'good enough' today is likely not 'good enough' tomorrow... But the question remains, what does the industry currently think 'good enough' is? What reference points are available for comparison? Some references I've located: Sept 2000 - 1000+ rounds recommended (source: RFC 2898) Feb 2005 - AES in Kerberos 5 'defaults' to 4096 rounds of SHA-1. (source: RFC 3962) Sept 2010 - ElcomSoft claims iOS 3.x uses 2,000 iterations, iOS 4.x uses 10,000 iterations, shows BlackBerry uses 1 (exact hash algorithm is not stated) (source: ElcomSoft ) May 2011 - LastPass uses 100,000 iterations of SHA-256 (source: LastPass ) Jun 2015 - StableBit uses 200,000 iterations of SHA-512 (source: StableBit CloudDrive Nuts & Bolts ) Aug 2015 - CloudBerry uses 1,000 iterations of SHA-1 (source: CloudBerry Lab Security Consideration (pdf) ) I'd appreciate any additional references or feedback about how you determined how many iterations was 'good enough' for your application. As additional background, I'm considering PBKDF2-SHA256 as the method used to hash user passwords for storage for a security conscious web site. My planned PBKDF2 salt is: a per-user random salt (stored in the clear with each user record) XOR'ed with a global salt. The objective is to increase the cost of brute forcing passwords and to avoid revealing pairs of users with identical passwords. References: RFC 2898: PKCS #5: Password-Based Cryptography Specification v2.0 RFC 3962: Advanced Encryption Standard (AES) Encryption for Kerberos 5 PBKDF2: Password Based Key Derivation Function v2", "question_score": 242, "question_tags": ["cryptography", "passwords", "appsec", "hash", "pbkdf2"], "choices": {"A": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "B": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match...", "C": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess.", "D": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3959/recommended-of-iterations-when-using-pbkdf2-sha256"} +{"id": "cybersecurity_40050", "domain": "cybersecurity", "question_title": "Best Practice: ”separate ssh-key per host and user“ vs. ”one ssh-key for all hosts“", "question_body": "Is it better to create a separate SSH key for each host and user or just using the id_rsa key for all hosts to authenticate? Could one id_rsa be malpractice for the privacy/anonymity policies? having one ssh-key for all hosts: ~/.ssh/id_rsa ~/.ssh/id_rsa.pub in comparison to separate ssh-keys: ~/.ssh/user1_host1 ~/.ssh/user1_host1.pub ~/.ssh/user2_host1 ~/.ssh/user2_host1.pub ~/.ssh/user3_host2 ~/.ssh/user3_host2.pub ~/.ssh/user4_host3 ~/.ssh/user4_host3.pub ... etc.", "question_score": 240, "question_tags": ["privacy", "ssh", "key-management", "anonymity", "key-generation"], "choices": {"A": "From what I heard earlier today, https/ssl flows correctly through your borders. You should hence check out Corkscrew . Similarly to netcat , it's used to wrap ssh in https to allow the use of https proxies. Another solution would be to use LSH which, by having a different signature than ssh, works from Iran as Siavash noted it in his message .", "B": "There is no proof that DuckDuckGo operates as advertised. (There never is, on the web.) However, that is the wrong question. DuckDuckGo is very clear in its privacy policy . DuckDuckGo says it doesn't track you , it doesn't send your searches to other sites , by default it does not use any cookies , it does not collect personal information , it does not log your IP address or other information about your computer that may be sent automatically with your searches , it doesn't store any personal information at all . Those are pretty strong promises, with no...", "C": "A private key corresponds to a single \"identity\" for a given user, whatever that means to you. If, to you, an \"identity\" is a single person, or a single person on a single machine, or perhaps a single instance of an application running on a single machine. The level of granularity is up to you. As far as security is concerned, you don't compromise your key in any way [1] by using it to log in on a machine (as you would by using a password), so having separate keys for separate destinations doesn't make you any more safe from...", "D": "I like to store mine on paper. Using a JavaScript (read: offline) QR code generator, I create an image of my private key in ASCII armoured form, then print this off. Note alongside it the key ID and store it in a physically secure location. Here's some that should work for you no matter what operating system you use, as long as you have a browser that supports JavaScript. For Windows users: Click here to download the JavaScript QR code generator: https://github.com/davidshimjs/qrcodejs/archive/04f46c6a0708418cb7b96fc563eacae0fbf77674.zip Extract the files somewhere, then proceed edit index.html per the instructions below. For MacOS or Unix users: #..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/40050/best-practice-separate-ssh-key-per-host-and-user-vs-one-ssh-key-for-all-hos"} +{"id": "cybersecurity_200243", "domain": "cybersecurity", "question_title": "All 0s (zeros) in a bank card's CVC code", "question_body": "My bank card recently expired. I got a new one and this one turned out to be \"lucky\": its CVC code was 000 . For a few months I used it extensively, both online and offline, without any difficulties - until the day when I entered my card details on Booking.com. I filled in the form, clicked \"submit\" - only to see the page discard the value in the CVC field and demand that I enter it again. I contacted support. They confirmed that CVC code \"000\" is not acceptable because it is considered not secure enough (not an exact quote unfortunately, as the conversation was in Estonian), and they suggested that I order a new bank card where the CVC code would be different from \"000\". That puzzled me. As a former tester, I'm quite used to situations where I think I'm reporting a bug and then I'm told it is actually a feature, but this time it was somewhat against common sense. My current work is also related to information security and I can think of three reasons their claim doesn't make sense: CVC is not just a random number, there is a certain algorithm of generating it. This, in turn, means that all values are equally probable and some certain numbers can't just be excluded from it. I have already used this card with a number of other online services, including Amazon Web Services, whose security is out of any doubts. I don't quite understand what \"not secure enough\" means. Are \"111\" or \"999\" secure enough? If not, how about \"123\" or \"234\"? Again, it's not something I pick myself, it's something I'm given by a bank, and if the bank thinks it's secure, then it must be treated as such. Their response was very polite but not very helpful: \" We totally understand your frustration and we are really sorry about causing you inconvenience. We handed your reasoning over to our management - they responded that 000 is considered invalid, and this is also a way banks indicate that the card is a forgery \". I forwarded the mail chain to my bank and asked for their advice. They told me they'd issue a new card for free, which solved the problem for me. However, I still wonder: Are there any official regulations/prescriptions (from Visa/MC or elsewhere) or any best practices regarding \"all-zero\" CVC/CVV codes? Especially that bit about banks allegedly using 000 as an indication of a forgery - sounds like complete nonsense to me. I tried googling, but couldn't find anything. From a practical point of view, how reasonable it is to decline \"000\" as insecure? I listed my concerns above, but maybe I'm missing something? Update : Tough choice on which answer to accept... I liked the answer from Alexander O'Mara a lot - it is detailed and to the point. The latest revision of Harper's answer also seems very reasonable. Yet I eventually decided to accept the answer by Zoey - it seems the most relevant, as it, besides everything else, also sheds some light on the internals of hotel business. Thanks everyone for your answers and comments! What I'm going to do now is contact Booking.com support again and insist on getting this fixed. Will let you know about the outcome. Update 2 : After several months of trying to contact Booking.com's support I officially give up. I haven't gone any further than a countless number of support tickets that were not even confirmed, not to mention being reacted on, and a couple of phone calls where I explained the situation and got nothing but a canned email \"we are trying very hard to solve your problem\". Bottomline: Booking.com's support doesn't work - unless your problem is very standard, it won't be solved nor escalated to higher management. The bug still exists. I'm now assured that it is nothing but a software bug, because CVC \"000\" is perfectly accepted when you add a new card, but it doesn't work when you are trying to update an expired (or otherwise invalid card). Here's the repro steps: Create a new booking that requires immediate payment. Enter an invalid card (expired or blocked). When the system sends a notification that the card can't be processed, select \"update card details\" and enter details of a valid card with CVC code 000. Expected result: the card data gets accepted for further processing. Actual result: the entered CVC code gets discarded and the dialog window complains that CVC code is not entered.", "question_score": 239, "question_tags": ["credit-card"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "Alexander O'Mara provided a correct answer , but having worked in a hotel that was using booking.com I believe I can provide additional information about the reason that CVV was denied. Every day the hotel I worked in would receive around 50 bookings, a quarter of these bookings would be using fake credit card details, and about 90% of people using fake credit card details would not show up. This resulted in a lot of guesswork when assigning rooms, we would often try to guess if the person will show up just based on their credit card details, and also...", "C": "Simply put, Account Updater : When participating issuers re-issue cards, they submit the new account number and expiration date to VAU. Participating merchants send inquiries on their credentials-on-file to VAU and are provided with updated card information, if available. This helps participating issuers retain cardholders by maintaining continuity of their payment relationships with participating merchants. Shutterstock subscribes to Account Updater, and gets updated copies of your card info when it expires or is replaced. VAU is Visa's version; more info is in a fact sheet here . MasterCard calls their version Account Billing Updater . American Express calls their version...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/200243/all-0s-zeros-in-a-bank-cards-cvc-code"} +{"id": "cybersecurity_202902", "domain": "cybersecurity", "question_title": "Is single quote filtering nonsense?", "question_body": "Penetration testers found out that we allow single quotes in submitted data fields, and want us to apply rules (input validation) to not allow them in any value. While I'm aware that single quotes are popular for SQL injection attacks, I strongly disagree that they should not be allowed as valid input. I am advocating for actually preventing SQL injection by means of using prepared statements (which properly quote the values) instead of filtering out anything that remotely looks like being an SQL fragment. My case: Person names can contain single quotes (such as O'Reilly ) Text fields can contain single quotes (such as I'm pretty sure ) Number fields can contain single quotes ( EUR 1'000'000 ) and many more I've seen other cases where applying SQL injection prevention rules dicarded valid data for the silliest reasons (name \" Andreas \" rejected because it contains an AND , and various common words in plain text fields being rejected because they contained the keywords \" select \", \" insert \", \" update \" or \" delete \"). What's the security professionals' stance on that matter? Shall we reject implementing input validation for single quotes for the reasons I stated?", "question_score": 239, "question_tags": ["penetration-test", "sql-injection", "validation"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "C": "You should implement input validation as a defense-in-depth method. So input validation should not be your primary defense against SQL injection, that should be prepared statements. As an additional defense you should restrict the allowed inputs. This should never ever restrict functionality. If there is a legitimate use case to have apostrophes in input, you should allow it. So you should allow single quotes in name fields, descriptions, passwords, but not in number fields, username fields, license plate fields. To block single quotes in all input is madness. This breaks functionality of the application and isn't even the correct solution...", "D": "Always have your slip with you! This is the golden rule of Red Teaming! If you don't have your Permission to Attack with you, it's like driving without a driver's license. That said, if you are caught during an engagement, I recommend the following: Present a forged Permission to Attack. This way, you can see if criminals could possibly trick a security guard to letting them do their thing with a fake Permission to Attack. Present the real Permission to Attack. If a guard has not bought your fake slip, then it's time to hand in the real slip. If..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/202902/is-single-quote-filtering-nonsense"} +{"id": "cybersecurity_131106", "domain": "cybersecurity", "question_title": "Is there any reason to disable paste password on login?", "question_body": "Today I logged in to pay my cellphone bill, and I found that the site has disabled paste functionality in password field. I'm a webdev and I know how to fix this, but for regular user is REALLY annoying having to type a random password like o\\&$t~0WE'kL . I know that is normal to make users write the password when creating an account , but is there any reason to disable pasting passwords during login ?", "question_score": 238, "question_tags": ["passwords", "web-application", "password-management"], "choices": {"A": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "B": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at...", "C": "It's a leftover from the time when keypads didn't have the letters Q and Z . Security-wise, there's no reason. It's just because of old systems. To clarify: You used to be able to enter your password over the phone. Some phones didn't have the letters Q or Z, like the one on the picture below. Image courtesy: Bill Bradford on flickr.com Because of this, passwords including these characters were disallowed. They haven't changed this requirement for whatever reason: Legacy systems, poor documentation, or they just don't care.", "D": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/131106/is-there-any-reason-to-disable-paste-password-on-login"} +{"id": "cybersecurity_191460", "domain": "cybersecurity", "question_title": "Why did I have to wave my hand in front of my ID card?", "question_body": "I recently had to authenticate myself online to use an internet-based service. The authentication process was done via video call with me holding my ID card in front of my laptop camera beside my face. I also had to wiggle the ID card so the person on the other end of the video call could see the security features that are printed on the ID card. Then the person asked me to wave my hand in front of the ID card, so that it was shortly fully covered by my hand several times. What is this method supposed to achieve or is this just security theater?", "question_score": 235, "question_tags": ["authentication", "security-theater"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Given that this identification was likely performed according to German law, this request was to conform with BaFin Circular 3/2017 which demands (in their non-binding English translation): Any substitution/manipulation of parts or elements of the identity document must be countered by suitable measures. To this end, the person to be identified must be asked, for example, to place a finger over security-relevant parts of the identity document (variable and determined at random by the system) and move one hand across their face. Using stills from these movements that are cut out and enlarged, the employee must verify that the identity...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/191460/why-did-i-have-to-wave-my-hand-in-front-of-my-id-card"} +{"id": "cybersecurity_57909", "domain": "cybersecurity", "question_title": "Why would you not permit Q or Z in passwords?", "question_body": "Jetblue's password requirements specify that, among other stringent requirements: Cannot contain a Q or Z I can't fathom a logical reason for this, unless it were say, extremely common for the left side of keyboards to break, but then you wouldn't allow 'A' either :) What would be the reason for this security requirement?", "question_score": 232, "question_tags": ["passwords", "password-policy"], "choices": {"A": "It's a leftover from the time when keypads didn't have the letters Q and Z . Security-wise, there's no reason. It's just because of old systems. To clarify: You used to be able to enter your password over the phone. Some phones didn't have the letters Q or Z, like the one on the picture below. Image courtesy: Bill Bradford on flickr.com Because of this, passwords including these characters were disallowed. They haven't changed this requirement for whatever reason: Legacy systems, poor documentation, or they just don't care.", "B": "This combination is called a Secure attention key . The Windows kernel is \"wired\" to notify Winlogon and nobody else about this combination. In this way, when you press Ctrl + Alt + Del , you can be sure † that you're typing your password in the real login form and not some other fake process trying to steal your password. For example, an application which looks exactly like the windows login. In Linux, there's a loosely-defined equivalent which is Ctrl + Alt + Pause . However, it doesn't exactly do the same thing. It kills everything except where you're...", "C": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at...", "D": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/57909/why-would-you-not-permit-q-or-z-in-passwords"} +{"id": "cybersecurity_406", "domain": "cybersecurity", "question_title": "How should I distribute my public key?", "question_body": "I've just started to use GPG and created a public key. It is kind of pointless if no-one knows about it. How should I distribute it? Should I post it on my profile on Facebook and LinkedIn? How about my blog? What are the risks?", "question_score": 228, "question_tags": ["cryptography", "key-management", "pgp"], "choices": {"A": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "B": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "C": "Best way to distribute your key is by using one of the key servers that are available, such as keyserver.ubuntu.com , pgp.mit.edu or keyserver.pgp.com . If you use Seahorse (default key manager under Ubuntu), it automatically syncs your keys to one of these servers. Users can then look up your key using your email address or keyid. If you wanted to post your public key on LinkedIn or your blog, you can either upload the key to your server or just link to the page for your key on one of the keyservers above. Personally, I would upload it to...", "D": "Here are your possibilities, roughly in decreasing order of sophistication. Use an external Hardware Security Module. There is an entire industry of products designed for offloading security-sensitive operations to external devices. This doesn't solve the problem so much as relocate it, but it relocates it to device that is far more secure, so altogether it's a security win. If you're doing anything high-stakes, then this is almost certainly going to factor into your solution. Tie the encryption to your hardware. In theory HSMs do precisely this, only we tend to expect a bit more sophistication from an HSM than just..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/406/how-should-i-distribute-my-public-key"} +{"id": "cybersecurity_55116", "domain": "cybersecurity", "question_title": "How exactly does the OpenSSL TLS heartbeat (Heartbleed) exploit work?", "question_body": "I've been hearing more about the OpenSSL Heartbleed attack , which exploits some flaw in the heartbeat step of TLS. If you haven't heard of it, it allows people to: Steal OpenSSL private keys Steal OpenSSL secondary keys Retrieve up to 64kb of memory from the affected server As a result, decrypt all traffic between the server and client(s) The commit to OpenSSL which fixes this issue is here I'm a bit unclear - everything I've read contains information about what one should do about it, but not how it works. So, how does this attack work?", "question_score": 224, "question_tags": ["openssl", "heartbleed"], "choices": {"A": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "This is not a flaw in TLS; it is a simple memory safety bug in OpenSSL. The best explanations I've run across so far are the blog posts Diagnosis of the OpenSSL Heartbleed Bug by Sean Cassidy and Attack of the week: OpenSSL Heartbleed by Matthew Green. In short, Heartbeat allows one endpoint to go \"I'm sending you some data, echo it back to me\". You send both a length figure and the data itself. The length figure can be up to 64 KiB. Unfortunately, if you use the length figure to claim \"I'm sending 64 KiB of data\" (for..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/55116/how-exactly-does-the-openssl-tls-heartbeat-heartbleed-exploit-work"} +{"id": "cybersecurity_8145", "domain": "cybersecurity", "question_title": "Does https prevent man in the middle attacks by proxy server?", "question_body": "There is a desktop client A connecting to website W in a https connection A --> W Somehow between A and W, there is a proxy G. A --> G --> W In this case, will G be able to get the certificate which A previously got from W? If G can get the certificate, does that mean that G will be able to decrypt the data?", "question_score": 222, "question_tags": ["tls", "certificates", "sniffer"], "choices": {"A": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "B": "Serious certification authorities use heavy procedures. At the core, the CA key will be stored in a Hardware Security Module ; but that's only part of the thing. The CA itself must be physically protected, which includes proactive and retrospective measures. Proactive measures are about preventing attacks from succeeding. For instance, the CA will be stored in a vault, with steel doors and guards. The machines themselves are locked, with several padlocks, and nobody holds more than one padlock key. Physical security is of paramount importance; the HSM is only the deepest layer. Retrospective measures are about recovering after an...", "C": "How does HTTPS work? HTTPS is based on public/private-key cryptography . This basically means that there is a key pair: The public key is used for encryption and the secret private key is required for decryption. A certificate is basically a public key with a label identifying the owner. So when your browser connects to an HTTPS server, the server will answer with its certificate. The browser checks if the certificate is valid : the owner information need to match the server name that the user requested. the certificate needs to be signed by a trusted certification authority. If one...", "D": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/8145/does-https-prevent-man-in-the-middle-attacks-by-proxy-server"} +{"id": "cybersecurity_3936", "domain": "cybersecurity", "question_title": "Is a rand from /dev/urandom secure for a login key?", "question_body": "Lets say I want to create a cookie for a user. Would simply generating a 1024 bit string by using /dev/urandom , and checking if it already exists (looping until I get a unique one) suffice? Should I be generating the key based on something else? Is this prone to an exploit somehow?", "question_score": 221, "question_tags": ["cryptography", "web-application", "authentication", "linux", "random"], "choices": {"A": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a...", "B": "Yup! If they are able to retrieve the password from the database, then they are clearly not following password storage best-practices. OWASP provides a good guide for how to do it properly: https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet Here's some ammunition you could use in that letter: You want me (the legal guardian of my child) to sign a form. You are using the action of logging into a website and clicking a button as a form of legal signature. How do you know it was actually me that logged in and clicked the button? How many people had access to the sheet with the...", "C": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "D": "Go with RSA. DSA is faster for signature generation but slower for validation, slower when encrypting but faster when decrypting and security can be considered equivalent compared to an RSA key of equal key length. That's the punch line, now some justification. The security of the RSA algorithm is based on the fact that factorization of large integers is known to be \"difficult\", whereas DSA security is based on the discrete logarithm problem. Today the fastest known algorithm for factoring large integers is the General Number Field Sieve , also the fastest algorithm to solve the discrete logarithm problem in..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3936/is-a-rand-from-dev-urandom-secure-for-a-login-key"} +{"id": "cybersecurity_136379", "domain": "cybersecurity", "question_title": "Is there any reason to not show users incorrectly entered passwords after a successful login?", "question_body": "Our client has come up with the requirement that in case the username in question has had multiple failed login attempts, the incorrectly entered password(s) must be shown once a successful login is performed. Correctly entered information, including previous passwords, will not be shown in any case. Our lead dev has told us it is technically possible by not hashing incorrect entries, but she is extremely uncomfortable with the feature and thus it has been put on hold while we brainstorm it out. The website in question is a broad mapping/GIS application that does not feature any monetary transactions whatsoever. Other login/authentication options include Google/LinkedIn/Twitter/facebook, so obviously no passwords to be stored there and handling that is primarily a UX issue. What security vulnerabilities come with implementing such a feature? Our client is not entirely without technical knowledge so a general explanation is enough. My apologies if the question is too broad or the answer very obvious.", "question_score": 221, "question_tags": ["authentication", "passwords"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "C": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "D": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/136379/is-there-any-reason-to-not-show-users-incorrectly-entered-passwords-after-a-succ"} +{"id": "cybersecurity_68122", "domain": "cybersecurity", "question_title": "What is a specific example of how the Shellshock Bash bug could be exploited?", "question_body": "I read some articles ( article1 , article2 , article3 , article4 ) about the Shellshock Bash bug ( CVE-2014-6271 reported Sep 24, 2014) and have a general idea of what the vulnerability is and how it could be exploited. To better understand the implications of the bug, what would be a simple and specific example of an attack vector / scenario that could exploit the bug?", "question_score": 213, "question_tags": ["linux", "exploit", "known-vulnerabilities", "bash", "shellshock"], "choices": {"A": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "B": "A very simple example would be a cgi, /var/www/cgi-bin/test.cgi: #!/bin/bash echo \"Content-type: text/plain\" echo echo echo \"Hi\" Then call it with wget to swap out the User Agent string. E.g. this will show the contents of /etc/passwd: wget -U \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" http://10.248.2.15/cgi-bin/test.cgi To break it down: \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" Looks like: () { test } echo \\\"Content-type: text/plain\\\" echo echo /bin/cat /etc/passwd The problem as I understand it is that while it's okay to define a function in an environment variable, bash is not supposed to execute...", "C": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that...", "D": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/68122/what-is-a-specific-example-of-how-the-shellshock-bash-bug-could-be-exploited"} +{"id": "cybersecurity_120748", "domain": "cybersecurity", "question_title": "What should you do if you catch encryption ransomware mid-operation?", "question_body": "You boot up your computer one day and while using it you notice that your drive is unusually busy. You check the System Monitor and notice that an unknown process is using the CPU and both reading and writing a lot to the drive. You immediately do a web search for the process name, and find that it's the name of a ransomware program. A news story also comes up, telling you about how a popular software distribution site was recently compromised and used to distribute this same ransomware. You recently installed a program from that site. Clearly, the ransomware is in the process of doing its dirty work. You have large amounts of important data on the internal drive, and no backup. There is also a substantial amount of non-important data on the drive. This question's title says \"mid\" operation, but in this example we have not yet investigated how far the ransomware might have actually gotten in its \"work.\" We can look at two situations: You want to preserve as much of your data as possible. However, paying any ransom is out of the question. If possible without risk, you want to know whether the important parts of your data are actually encrypted and overwritten. You also want to try and extract as much of your data as possible without making things worse. You would hate to pay a ransom. But certain parts of the data are so important to you that you would, ultimately, as a last resort, like to still be able to pay for a chance to get them back rather than risk losing any of them. Step by step, what is the ideal thing to do in situation 1 and 2? And why? Note: This is hypothetical. It hasn't actually happened to me. I always keep offsite backups of my important data and I've never been affected by ransomware.", "question_score": 210, "question_tags": ["encryption", "malware", "virus", "ransomware", "data-recovery"], "choices": {"A": "Plenty of places: BIOS / UEFI - BlackHat presentation (PDF) System Management Mode (SMM) or the Intel Management Engine (IME) - Phrack article . GPUs - Proof of concept rootkit on GitHub . Network cards - Recon 2011 presentation (PDF) A Quest To The Core (PDF) - a good presentation covering everything from BIOS to SMM to microcode. Modern hardware has a wide range of persistent data stores, usually used for firmware. It's far too expensive to ship a complex device like a GPU or network card and put the firmware on a mask ROM where it can't be updated,...", "B": "Hibernate the computer If the ransomware is encrypting the files, the key it is using for encryption is somewhere in memory. It would be preferable to get a memory dump, but you are unlikely to have the appropriate hardware for that readily available. Dumping just the right process should also work, but finding out which one may not be trivial (eg. the malicious code may be running inside explorer.exe ), and we need to dump it now . Hibernating the computer is a cheap way to get a memory image¹ Then it could be mounted read-only on a clean computer...", "C": "Yes encrypt, it is easy. Plus according to a 2014 Software Engineering Institute study 1 in 4 hacks was from someone inside the company with an average damage 50% higher than an external threat actor. Link to source: https://insights.sei.cmu.edu/insider-threat/2017/01/2016-us-state-of-cybercrime-highlights.html Although this is the 2017 version.", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/120748/what-should-you-do-if-you-catch-encryption-ransomware-mid-operation"} +{"id": "cybersecurity_6141", "domain": "cybersecurity", "question_title": "Amount of simple operations that is safely out of reach for all humanity?", "question_body": "Cryptographic primitives usually assert some security level given as number of operations to mount an attack. Hash functions, for example, give different security levels for collision attacks, preimage attacks and second preimage attacks. From these, \"safe\" key sizes are derived for different primitives. There are many different recommendations for safe key sizes and many different means of estimating future capabilities in performing computation. For example, www.keylength.com has a lot of these recommendations combined. What I'm looking for, however, is the amount of simple operations that can be obviously seen as out of reach for all humanity for the foreseeable future - or actually, the lowest such value that is still believable. It is very obvious that 2^256 simple operations is something that will never be reached. It is also very obvious that 2^64 simple operations can be reached as it already has been. Many of the recommendations seem to calculate 2^128 as a number that would be safe for 30 years or more. So the value I am looking for is likely between 2^128 and 2^256. I am guessing 2^160 or 2^192 might be safely out of reach. But I want concrete arguments that can be easily reasoned about. I'd love to see arguments that are based on simple laws of physics or relations to concrete constants about the universe. For example, Landauer's principle could be used. Note: the actual simple operations used are not relevant here - they might be operations on a quantum computer, or hash invocations, or whatever.", "question_score": 208, "question_tags": ["cryptography", "research", "theory"], "choices": {"A": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "B": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "Your example string ( WeJcFMQ/8+8QJ/w0hHh+0g== ) is Base64 encoding for a sequence of 16 bytes, which do not look like meaningful ASCII or UTF-8. If this is a value stored for password verification (i.e. not really an \"encrypted\" password, rather a \"hashed\" password) then this is probably the result of a hash function computed over the password; the one classical hash function with a 128-bit output is MD5. But it could be about anything. The \"normal\" way to know that is to look at the application code. Application code is incarnated in a tangible, fat way (executable files on a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/6141/amount-of-simple-operations-that-is-safely-out-of-reach-for-all-humanity"} +{"id": "cybersecurity_45170", "domain": "cybersecurity", "question_title": "How safe are password managers like LastPass?", "question_body": "I use LastPass to store and use my passwords, so I do not have duplicate passwords even if I have to register four to five different accounts a day, and the passwords are long. How safe are password manager services like LastPass? Don't they create a single point of failure? They are very attractive services for hackers. How can I trust the people behind these services and their security mechanisms? I imagine that a third party (government, company, etc.) would be very easy to 'bribe' and get all of my passwords. Are there any other solutions that offer similar services with similar ease of use?", "question_score": 206, "question_tags": ["passwords", "password-management"], "choices": {"A": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "B": "I interpret your question as: What's the motivation for someone to use an alien Facebook account to play poker and stock it with chips? It's not that strange if you think about it this way: As poker is a game where knowledge about the dealt cards gives you a significant edge in the game, you'd like to use sock puppets at a table to know more about the card distribution. Thus, using sock puppets that are valid, active - real - Facebook accounts are the only way to gather more information without being spotted easily by heuristics. Düsseldorf is where...", "C": "We should distinguish between offline password managers (like Password Safe ) and online password managers (like LastPass ). Offline password managers carry relatively little risk. It is true that the saved passwords are a single point of failure. But then, your computer is a single point of failure too. The most likely cause of a breach is getting malware on your computer. Without a password manager, malware can quietly sit and capture all the passwords you use. With a password manager, it's slightly worse, because once the malware has captured the master password, it gets all your passwords. But then,...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/45170/how-safe-are-password-managers-like-lastpass"} +{"id": "cybersecurity_126932", "domain": "cybersecurity", "question_title": "How secure is 'blacking out' sensitive information using MS Paint?", "question_body": "I'm wondering if it's safe to black out sensitive information from a picture just by using Microsoft Paint ? Let's take in this scenario that EXIF data are stripped and there is no thumbnail picture, so that no data can be leaked in such a way. But I'm interested in whether there is any other attack, that can be used in order to retrieve hidden information from the picture?", "question_score": 204, "question_tags": ["forensics", "data-leakage", "image"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "C": "As mentioned in the answers to a very similar question , scribbling over part of an image will destroy the original pixels, assuming that your editor doesn't store any layers or undo history in the saved image. (Paint doesn't.) There are some things to watch out for, though: The width of the blanked region places an upper bound on the length of the secret data The height of the region could tell attackers whether the text representation of the data has ascenders or descenders (like in the letters b and p ) Any spaces in the blanked region provide information...", "D": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/126932/how-secure-is-blacking-out-sensitive-information-using-ms-paint"} +{"id": "cybersecurity_172212", "domain": "cybersecurity", "question_title": "How do mobile carriers know video resolution over HTTPS connections?", "question_body": "Verizon is modifying their \"unlimited\" data plans. Customers in the USA can stream video at 480p -or- pay to unlock higher resolutions (both 720p and +1080p). They are not the only mobile carrier to implement rules like this . If I am on a site that implements HTTPS for video streaming, say YouTube or Facebook, how do carriers know what resolution I'm watching? If carriers are throttling bandwidth for all data, then talking about video resolutions seems like misdirection. If it's only video, that would seem to raise privacy concerns.", "question_score": 204, "question_tags": ["encryption", "tls", "cellular"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/172212/how-do-mobile-carriers-know-video-resolution-over-https-connections"} +{"id": "cybersecurity_52115", "domain": "cybersecurity", "question_title": "Don't understand how my mum's Gmail account was hacked", "question_body": "My mum (on Gmail, using Chrome) received an email from a friend's Hotmail address. She opened the email (very obviously a phishing email) and clicked a link in it. This opened a webpage with loads of medical ads on. She closed the page and deleted the email. She did not notice anything else happen when she clicked the link. For example, she did not see a download start and did not click anything on the page that opened. The URI of the link she clicked was hxxp://23.88.82.34/d/?sururopo=duti&bugenugamaxo=aGViZTFzaGViZUBob3RtYWlsLmNvLnVr&id=anVuYWx4QGdvb2dsZW1haWwuY29t&dokofeyo=anVuYWx4 [DON'T visit that address!] Immediately (although she didn't know at the time) about 75 emails were sent from her Gmail address to a selection of her contacts. They are visible in the Sent Mail list in her Gmail account. This happened between 17:08 and 17:10 GMT. Here the source of one: Return-Path: Received: from localhost (host86-152-149-189.range86-152.btcentralplus.com. [86.152.149.189]) by mx.google.com with ESMTPSA id r1sm16019263wia.5.2014.02.23.09.10.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Feb 2014 09:10:16 -0800 (PST) Message-ID: Date: Sun, 23 Feb 2014 09:10:16 -0800 (PST) MIME-Version: 1.0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable From: lalala@googlemail.com Return-Path: lalala@googlemail.com Subject: Bar gain Mount your brooms said Madam= Hooch Three two one =20 lalala@googlemail.com has sent you 3 offline broadcast Locate Full Email Content Here's the Gmail \"Activity information\" window: Type Origin Timestamp SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) Note that the IP address in that list, 86.152.149.189, is the same as in the header of that email. One of my mum's friends reports that she received one of the emails and clicked on the link in it. She says that her email account then sent out a load of emails too. I don't know what my mum's IP address was at the time this happened. So maybe it was 86.152.149.189. I don't understand how this happened. She had an impressively strong password (which I've now changed) that she doesn't use for anything else and she didn't type this password into the page that opened. How on earth could clicking a link in an email allow an attacker authenticate themselves with the Gmail SMTP server as my mum and then to send a load of emails as her to her contacts? And how could it have got the addresses of her contacts? Update subsequent to Iserni's answer : My mum confirms that she did indeed enter her Gmail password when \"Gmail\" asked for it after the page of medical ads closed. Her aunt received one of the emails and was also asked to enter her Gmail login details. She says she did because the original email came from my mum. Clever attack.", "question_score": 201, "question_tags": ["email", "phishing"], "choices": {"A": "It is not. This is a FUD ( fear, uncertainty, and doubt ) campaign by GMX because they want to display their ads. There is absolutely no security risk from the mentioned ad blockers. They added some crapware to the list to make it look more legitimate. Of course such campaigns are very unusual, especially from such a big and well known company like GMX. Unfortunately, I have no English source at hand (because it's a German only campaign) but since you speak German you may want to read this article at heise.de . Update #1: United Internet, the company...", "B": "IMPORTANT : this is based on data I got from your link, but the server might implement some protection. For example, once it has sent its \"silver bullet\" against a victim, it might answer with a faked \"silver bullet\" to the same request, so that anyone investigating is led astray. I have tried sending a fake parameter of cHVwcGFtZWxv to see whether it triggered any different behaviour, and it did not. Still, that's no great guarantee. UPDATE - the above still holds, but I've been making tests from random IPs not traceable to my main session - the attacking server...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/52115/dont-understand-how-my-mums-gmail-account-was-hacked"} +{"id": "cybersecurity_123234", "domain": "cybersecurity", "question_title": "How can I explain to non-techie friends that "cryptography is good"?", "question_body": "After that case in which Brazilian government arrested a Facebook VP due to end-to-end encryption and no server storage of messages on WhatsApp to prove connection with a drug case, it's become pretty common for friends of mine to start conversations about what cryptography is and why we should use it on a daily basis. The same applies with the iPhone terrorist encryption case in which the FBI broke in . For non-techie friends, it's easy to understand the basics of cryptography. I have managed to explain them the basics, public key x private key, what is end-to-end encryption during communication(your data is not stored encrypted, but it is \"scrambled\" during data exchange), all the core concepts without enter on more technical words like AES, MD5, SSL, PGP, hardware encryption acceleration, TPMs, etc. They like to have encryption on their phones, but they always come up with the following concept: If terrorists/criminals could be caught by not having cryptography in our world, I would not blame data surveillance by governments and companies, nor the lack of cryptography in our communications/data storage. I explained that this point of view is somehow twisted (as a knife can be used to do crimes, but its primary use is as a tool), but I didn't keep their attention. Is there a best way to explain the value of cryptography for end-users in our modern world? (Snowden and Assange stories seems like fairy tales to them too). Compendium: Some of the explanations/concepts that didn't work so far: Would you let the government have a copy of your house key? People tend to isolate data from house access, and they clearly would say \"no, i do not want the government to have a copy of my house key and watch me doing private stuff. But if they are looking for a terrorist/criminal, it's fine to break the door\". For them, it's okay since they don't break in your house while you are pooping. The existence of a \"master key\" on encryption world is fine to them. \"My information is encrypted, but it could be turned into plain again in case of terrorism/crime\". Would you let others trace your life based on what you do online? \"But Google already does that based on emails and searches...\". This mostly shocks me, because they are \"with the flow\" and they aren't bothered with data mining. Worse, people tend to trust way too much on Google. What about the privacy of your communications? What if you are talking dirty things with your boy(girl)friend? . \"I don't talk about things that would harm others(criminally speaking) so, i don't mind on being MITM'ded.\". Again, it's fine to them if a conversation about their sexual routine is recorded, if the intent is to investigate criminal activity on their city. The Knife paradox . You can see on their faces that this is a good one, but instead, they say that \"knifes aren't as dangerous as secret information being traded between criminals so, it's okay that Knifes are misused by criminals sometimes\".", "question_score": 200, "question_tags": ["cryptography", "data-leakage"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "C": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "D": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/123234/how-can-i-explain-to-non-techie-friends-that-cryptography-is-good"} +{"id": "cybersecurity_23383", "domain": "cybersecurity", "question_title": "SSH key-type, rsa, dsa, ecdsa, are there easy answers for which to choose when?", "question_body": "As someone who knows little about cryptography, I wonder about the choice I make when creating ssh-keys. ssh-keygen -t type , where type is either of dsa,rsa and ecdsa. Googling can give some information about differences between the types, but not anything conclusive. So my question is, are there any \"easy\" answers for developers/system administrators with little cryptography knowledge, when to choose which key type? I'm hoping for an answer in the style of \"Use DSA for X and Y, RSA for Z, and ECDSA for everything else\", but I also realise it's quite possible such simple answers are not available.", "question_score": 198, "question_tags": ["ssh", "key-generation"], "choices": {"A": "In practice, a RSA key will work everywhere. ECDSA support is newer, so some old client or server may have trouble with ECDSA keys. A DSA key used to work everywhere, as per the SSH standard ( RFC 4251 and subsequent), but this changed recently: OpenSSH 7.0 and higher no longer accept DSA keys by default. ECDSA is computationally lighter, but you'll need a really small client or server (say 50 MHz embedded ARM processor) to notice the difference. Right now , there is no security-related reason to prefer one type over any other, assuming large enough keys (2048 bits...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that...", "D": "From what I heard earlier today, https/ssl flows correctly through your borders. You should hence check out Corkscrew . Similarly to netcat , it's used to wrap ssh in https to allow the use of https proxies. Another solution would be to use LSH which, by having a different signature than ssh, works from Iran as Siavash noted it in his message ."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/23383/ssh-key-type-rsa-dsa-ecdsa-are-there-easy-answers-for-which-to-choose-when"} +{"id": "cybersecurity_50878", "domain": "cybersecurity", "question_title": "ECDSA vs ECDH vs Ed25519 vs Curve25519", "question_body": "Among the Elliptic Curve Cryptography (ECC) algorithms available in OpenSSH (ECDH, ECDSA, Ed25519, Curve25519), which offers the best level of security, and (ideally) why?", "question_score": 198, "question_tags": ["encryption", "ssh", "ecc"], "choices": {"A": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "B": "In SSH, two algorithms are used: a key exchange algorithm (Diffie-Hellman or the elliptic-curve variant called ECDH) and a signature algorithm. The key exchange yields the session key which will be used to encrypt data for that session. The signature is so that the client can make sure that it talks to the right server (another signature, computed by the client, may be used if the server enforces key-based client authentication). ECDH uses a curve ; most software use the standard NIST curve P-256. Curve25519 is another curve, whose \"sales pitch\" is that it is faster, not stronger, than P-256....", "C": "Hibernate the computer If the ransomware is encrypting the files, the key it is using for encryption is somewhere in memory. It would be preferable to get a memory dump, but you are unlikely to have the appropriate hardware for that readily available. Dumping just the right process should also work, but finding out which one may not be trivial (eg. the malicious code may be running inside explorer.exe ), and we need to dump it now . Hibernating the computer is a cheap way to get a memory image¹ Then it could be mounted read-only on a clean computer...", "D": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/50878/ecdsa-vs-ecdh-vs-ed25519-vs-curve25519"} +{"id": "cybersecurity_199971", "domain": "cybersecurity", "question_title": "Search for military installed backdoors on laptop", "question_body": "My laptop was confiscated by the military institute of my country and they made me to give them all my passwords (I cannot tell you the name of my country). They did not give it back to me for one week (yes, it was out of my sight for a while). I nuked it from orbit but I just realised that it was on sleep state for 2 days and not in shutdown state, so it was connected to my modem via wifi. Does it need to be worried about? and I need to make sure if they have added something to monitor my activities or steal my data or not? And if they have done that, what should I do to prevent them. I have double checked the laptop physically and there is no sign of screw or plastic deformation. Is that still possible that they have compromised its hardware?", "question_score": 198, "question_tags": ["malware", "windows", "privacy", "backdoor"], "choices": {"A": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "B": "If the device left your sight for any amount of time, replace it. It can no longer be trusted. The cost to assure it can still be trusted significantly exceeds the cost of getting a new one There is effectively no way to verify that the hardware has not been tampered with without significant expertise and employing non-trivial resources. The only solution is to replace the laptop and all associated components. Without knowing your country or other aspects of the situation you are in, there is no way for me to comment on the likelihood of this, only on the...", "C": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "D": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/199971/search-for-military-installed-backdoors-on-laptop"} +{"id": "cybersecurity_167412", "domain": "cybersecurity", "question_title": "Isn't Ubuntu's system prompt for my password spoofable?", "question_body": "Sometimes, Ubuntu shows the following window: This window can be caused by some background processes running, such as an automatic update, or a process which reports bugs to Canonical which manifests itself this way: Since those are background processes, the first window is not shown in response to an action I performed myself, in a situation where I was expecting the system to ask me for the password. This means that: From the perspective of the user, there is no guarantee that the prompt comes from the operating system; it could be any malicious program which had only a limited permission to show a window, and which, by prompting for my password, will gain unlimited access to the entire machine. By prompting the user for a password regularly, the system teaches the user that giving his system password whenever some application asks for it is a perfectly natural thing to do. My questions are: Is there any safety mechanism in Linux in general or Ubuntu specifically that prevents any application from displaying a dialog which looks identical to the system one, asking me for my password? How should such windows be designed to increase the safety of the user? Why not implement a system similar to Windows' Ctrl + Alt + Del on logon ?", "question_score": 194, "question_tags": ["passwords", "linux", "privilege-escalation"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "C": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "D": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/167412/isnt-ubuntus-system-prompt-for-my-password-spoofable"} +{"id": "cybersecurity_20129", "domain": "cybersecurity", "question_title": "How and when do I use HMAC?", "question_body": "I was reading HMAC on wikipedia and I was confused about a few points. Where do I use HMAC? Why is the key part of the hash? Even if someone successfully used a \"length-extension attack\", how would that be useful to the attacker?", "question_score": 191, "question_tags": ["hmac"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "A message authentication code (MAC) is produced from a message and a secret key by a MAC algorithm. An important property of a MAC is that it is impossible¹ to produce the MAC of a message and a secret key without knowing the secret key. A MAC of the same message produced by a different key looks unrelated. Even knowing the MAC of other messages does not help in computing the MAC of a new message. An HMAC is a MAC which is based on a hash function . The basic idea is to concatenate the key and the message,...", "D": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/20129/how-and-when-do-i-use-hmac"} +{"id": "cybersecurity_39231", "domain": "cybersecurity", "question_title": "How do I deal with a compromised server?", "question_body": "I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism: What are my first steps? When I arrive on site should I disconnect the server, preserve \"evidence\", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning? This is meant to be a canonical post for this topic. Originally from serverfault .", "question_score": 190, "question_tags": ["system-compromise"], "choices": {"A": "Originally from serverfault. Thanks to Robert Moir (RobM) It's hard to give specific advice from what you've posted here but I do have some generic advice based on a post I wrote ages ago back when I could still be bothered to blog. Don't Panic First things first, there are no \"quick fixes\" other than restoring your system from a backup taken prior to the intrusion, and this has at least two problems. It's difficult to pinpoint when the intrusion happened. It doesn't help you close the \"hole\" that allowed them to break in last time, nor deal with the...", "B": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "C": "An IP address can be set up in DNS to resolve to any host name, by whoever is in control of that IP address. For example, if I am in control of the netblock 203.0.113.128/28, then I can set up 203.0.113.130 to reverse-resolve to presidential-desktop.oval-office.whitehouse.gov . I don't need control of whitehouse.gov to do this, though it can help in some situations (particularly, with any software that checks to make sure reverse and forward resolution matches ). That wouldn't mean that the president of the United States logged into your VPS. If someone has access to your system, they can...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/39231/how-do-i-deal-with-a-compromised-server"} +{"id": "cybersecurity_53481", "domain": "cybersecurity", "question_title": "Does Facebook store plain-text passwords?", "question_body": "I was about to reset my Facebook password and got this error: Your new password is too similar to your current password. Please try another password. I assumed that Facebook stores only password hashes, but if so, how can they measure passwords similarity? This should be impossible with good hashing function, right? Question is - how is this possible and what are the implications? Thanks in advance. UPDATE I didn't make it clear - I was not asked to provide old and new password. It was the \"reset password\" procedure, where I only provide a new password, so most of answers of suggested duplicate are not applicable. UPDATE2 mystery solved - see comment (from Facebook engineer)", "question_score": 190, "question_tags": ["passwords", "hash", "facebook"], "choices": {"A": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess.", "D": "This is still up to date as of July 2024. The OpenSSH defaults are safe to trust. I recommend the Secure Secure Shell article, which suggests: ssh-keygen -t ed25519 -a 100 Ed25519 is an EdDSA scheme with very small (fixed size) keys, introduced in OpenSSH 6.5 (2014-01-30) and made default (\"first-preference\") in OpenSSH 8.5 (2021-03-03). These have complexity akin to RSA at 4096 bits thanks to elliptic curve cryptography (ECC). The -a 100 option specifies 100 rounds of key derivations, making your key's password harder to brute-force. In OpenSSH 9.0 (2022-04-08), OpenSSH also set its default key exchange method to..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/53481/does-facebook-store-plain-text-passwords"} +{"id": "cybersecurity_3989", "domain": "cybersecurity", "question_title": "How to determine what type of encoding/encryption has been used?", "question_body": "Is there a way to find what type of encryption/encoding is being used? For example, I am testing a web application which stores the password in the database in an encrypted format ( WeJcFMQ/8+8QJ/w0hHh+0g== ). How do I determine what hashing or encryption is being used?", "question_score": 185, "question_tags": ["encryption", "cryptography", "encoding", "cryptanalysis"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could...", "C": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "D": "Your example string ( WeJcFMQ/8+8QJ/w0hHh+0g== ) is Base64 encoding for a sequence of 16 bytes, which do not look like meaningful ASCII or UTF-8. If this is a value stored for password verification (i.e. not really an \"encrypted\" password, rather a \"hashed\" password) then this is probably the result of a hash function computed over the password; the one classical hash function with a 128-bit output is MD5. But it could be about anything. The \"normal\" way to know that is to look at the application code. Application code is incarnated in a tangible, fat way (executable files on a..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3989/how-to-determine-what-type-of-encoding-encryption-has-been-used"} +{"id": "cybersecurity_138996", "domain": "cybersecurity", "question_title": "Is the NHS wrong about passwords?", "question_body": "An NHS doctor I know recently had to do their online mandatory training questionnaire, which asks a bunch of questions about clinical practice, safety and security. This same questionnaire will have been sent to all the doctors in this NHS trust. The questionnaire included the following question: Which of the following would make the most secure password? Select one: a. 6 letters including lower and upper case. b. 10 letters a mixture of upper and lower case. c. 7 characters that include a mixture of numbers, letters and special characters. d. 10 letters all upper case. e. 5 letters all in lower case. They answered \"b\", and they lost a mark, as the \"correct answer\" was apparently \"c\". It is my understanding that as a rule, extending password length adds more entropy than expanding the alphabet. I suppose the NHS might argue that people normally form long passwords out of very predictable words, making them easy to guess. But if you force people to introduce \"special characters\" they also tend to use them in very predictable ways that password guessing algorithms have no trouble with. Although full disclosure, I'm not a password expert - I mostly got this impression from Randall Munroe (click for discussion): Am I wrong?", "question_score": 185, "question_tags": ["passwords", "password-policy", "entropy"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "C": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "D": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/138996/is-the-nhs-wrong-about-passwords"} +{"id": "cybersecurity_49234", "domain": "cybersecurity", "question_title": "Why are chips safer than magnetic stripes?", "question_body": "After the recent Target hack there has been talk about moving from credit cards with magnetic stripes to cards with a chip. In what ways are chips safer than stripes?", "question_score": 183, "question_tags": ["credit-card", "smartcard"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "You can't clone the chip. A magnetic strip holds a secret number, and if someone knows that number they can claim to be the owner of the card. But if a bad guy swipes the card, they then know the number, and can make their own card, i.e. \"cloning\". This has turned out to be a major practical problem with magstripe cards. A chip also holds a secret number. However, it is securely embedded in the chip. When you use the card, the chip performs a public key operation that proves it knows this secret number. However, it never reveals..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/49234/why-are-chips-safer-than-magnetic-stripes"} +{"id": "cybersecurity_138606", "domain": "cybersecurity", "question_title": "Help! My home PC has been infected by a virus! What do I do now?", "question_body": "This is an attempt to ask a canonical question as discussed in this old meta post . The goal is to create something helpful that can be used as a duplicate when non experts ask about virus infections. Let's say that I have determined beyond doubt that my home PC is infected by a virus. If necessary, you can assume that my computer runs Windows. Answers aimed at the non-technical reader are encouraged. What do I do now? How do I get rid of the virus? Do I really need to do a full reinstall? Can't I just run a couple of anti-virus programs, delete some registry keys, and call it a day? I really don't have time to deal with this right now. Is it dangerous to keep using the computer while it is infected? I don't have backups of my family photos or my master thesis from before the infection occurred. Is it safe to restore backups made after the infection occurred? Do I need to worry about peripherals getting infected? Do I need to do anything about my router or other devices on my home network?", "question_score": 183, "question_tags": ["malware", "virus", "antivirus", "antimalware", "virus-removal"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "Take a look at this USB keyboard : \"But that's not a keyboard! That's an USB drive, silly!\" Actually, no. It looks like a USB drive to you, but when it gets connected to a computer, it will report that it is a USB keyboard. And the moment it is installed, it will start typing key sequences you programmed on it beforehand. Any operating system I know automatically trusts USB keyboards and installs them as trusted input devices without requiring any user interaction the moment they are connected. There are various payloads available for it. For example, there is one...", "C": "What do I do now? How do I get rid of the virus? The best option is what is referred to as \" nuke it from orbit .\" The reference is from Aliens : The idea behind this is that you wipe your hard drive and reinstall your OS. Before you do this, you should make sure you have the following: A way to boot your computer off installation media. This can be in the form of the Install CD that came with your computer, or a DVD you burnt from an ISO file (Windows can be downloaded legally here...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/138606/help-my-home-pc-has-been-infected-by-a-virus-what-do-i-do-now"} +{"id": "cybersecurity_32917", "domain": "cybersecurity", "question_title": "How is an ATM secure?", "question_body": "I'm curious why an ATM computer is considered secure. The general adage of \"If an attacker has physical access to my machine, all bets are off,\" seems to not apply in this circumstance (since everyone has physical access to the machine). Why is this? I thought of the fact that many have security cameras placed over them, but this doesn't seem sufficient to keep ATMs secure, as there is no one constantly watching the camera feed and looking for suspicious behavior. The most this could be used for is identifying an attacker after an attack has been attempted. It seems like this is fairly easily solved through plain clothes, a mask, gloves, etc. So if this alone isn't or shouldn't be enough of a deterrent, why do we not see ATMs getting hacked for all their cash at 4:00am? What makes the device so secure? Is it just a simple risk-reward analysis, where the cash in the ATM isn't worth the effort of the hack? Or is there more to it which makes the computer secure? Also, I noted that there have been a couple questions about ATM security (like this one and this one ), but mine is about the physical security of the machine, since it violates a common security principle, not anything network related.", "question_score": 182, "question_tags": ["attack-prevention", "physical", "atm"], "choices": {"A": "I think the assumption here is wrong. They don't have physical access to the machine. They have supervised access to a very limited control panel for a machine which is built into a bomb-proof safe, bolted to the ground and hooked up to an alarm system with an armed response force. Get the machine out of the vault and away from supervision and then yes... all bets are off.", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "That all depends on the system, the attacker, and the level of preparation they had. If they have unlimited preparation, they could do effectively anything that they could do with an unlimited access window. Even if they do not have in-depth knowledge of the specific system, it would not be difficult to very quickly inject malicious code that allows for subsequent remote access. They could: Connect a PCMCIA or PCIe card and dump memory or inject code. Splice a hardware keylogger in between the keyboard's PS/2 or USB cable. Quickly download and execute malicious code, or modify existing code. Access...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/32917/how-is-an-atm-secure"} +{"id": "cybersecurity_56863", "domain": "cybersecurity", "question_title": "What is the purpose of "gibberish" comments posted to my blog?", "question_body": "Fairly frequently, the contact form on my blog gets comments that look similar to this (each field represents a text box users can enter into the HTML form on the blog): Name: 'ceguvzori' Email: 'gwizwo@avbhdu.com' Website: 'QrSkUPWK' Comment: vaB5LN pepddqfgpcwe , [url=http://hvyhfrijavkm.com/]hvyhfrijavkm[/url], [link=http://cwiolknjxdry.com/]cwiolknjxdry[/link], http://ubcxqsgqwtza.com/ I'd consider them to be spam, but the sites they link to don't exist, so they aren't helping SEO or spreading malicious links. Not even the email host, avbhdu.com , exists. What is the purpose of these comments?", "question_score": 182, "question_tags": ["spam"], "choices": {"A": "They're probing your site. First, whether the comment will be published. Second, note how they use several popular syntaxes for links - it's an attempt to check which of them will result in an actual HTML link. If your site lets those posts through, expect more spam, this time more malicious.", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/56863/what-is-the-purpose-of-gibberish-comments-posted-to-my-blog"} +{"id": "cybersecurity_63392", "domain": "cybersecurity", "question_title": "What is a good analogy to explain to a layman why passwords should be hashed?", "question_body": "Note: This is not an actual situation I'm currently in. Assume your boss is one of those old-fashioned computer-illiterate managers and wants to store the passwords in plaintext to simplify development. You get 5 minutes to explain the point of hashing passwords. You also know from experience that your boss can be swayed by a good analogy. What analogy would you use to explain your boss that passwords should be hashed?", "question_score": 178, "question_tags": ["passwords", "hash"], "choices": {"A": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match...", "B": "The Short Answer The short answer is: \"So you don't get hit with a $5 million class-action lawsuit .\" That should be reason enough for most CEOs. Hashing passwords is a lot cheaper. But more importantly: simply hashing the passwords as you suggested in your question isn't sufficient. You'll still get the lawsuit. You need to do more. Why you need to do more takes a bit longer to explain. So let's take the long route for a moment so that you understand what you're explaining, and then we'll circle around for your 5-minute synopsis. Hashing is just the beginning...", "C": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "D": "Lots of examples. A high-profile and recent example is when Kanye was caught on camera entering his \"00000\" password to unlock his device. Shoulder-surfing is one reason why applications do not display the password text on the screen, but show ****** instead. And this is one reason why multi-factor authentication is so important; even if you know the password, you cannot use it without another factor. I have even seen viable research into capturing the sound of the keyboard when a user types the password, even over the computer's microphone . So, yes, you describe a viable risk that the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/63392/what-is-a-good-analogy-to-explain-to-a-layman-why-passwords-should-be-hashed"} +{"id": "cybersecurity_71171", "domain": "cybersecurity", "question_title": "Is there anything preventing the NSA from becoming a root CA?", "question_body": "There are now tons of Certification Authorities (CAs) that are trusted by default in major OS's, many of which are unrecognizable without online lookup or reference. While there have been attempts by the NSA and others to \"hack\" or otherwise exploit root certicate authorities; is there anything preventing the NSA from becoming a Root CA itself? It certainly has the resources and expertise, and could \"suggest\" to major OS vendors to add its Root CA to the default trust store list (which is large enough that it may not be noticed by anyone..?) If it is feasible, what would the implications be? Could they essentially Man-in-the-Middle attack most HTTPS connections without a warning? (Perhaps not Dragnet-type interception, but close?) Or create a fake commercial root CA as obviously people would be suspicious if it had NSA plastered all over it?", "question_score": 177, "question_tags": ["certificate-authority", "man-in-the-middle", "nsa"], "choices": {"A": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "B": "It is already done: It is the FPKI root CA, under explicit and full control of the US government. Windows already trusts it by default. Before you flip out and begin to delete root CA certificates, burn your computer's motherboard, or drink a gallon of vodka, think about what it means. It means that the US government could technically emit a fake certificate for any SSL site that you are browsing -- but with a certificate chain that would point back to the US government. That is the point of having a \"trusted CA\" in the client: so that the...", "C": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "D": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/71171/is-there-anything-preventing-the-nsa-from-becoming-a-root-ca"} +{"id": "cybersecurity_8596", "domain": "cybersecurity", "question_title": "https security - should password be hashed server-side or client-side?", "question_body": "I am building a web application which requires users to login. All communication goes through https. I am using bcrypt to hash passwords. I am facing a dilemma - I used to think it is safer to make a password hash client-side (using JavaScript) and then just compare it with the hash in DB server-side. But I am not sure this is any better than sending plain-text password over https and then hashing it server-side. My reasoning is that if attacker can intercept the https traffic (= read plaintext password) he can for example also change the JavaScript so it sends the plaintext password alongside the hashed one - where he can intercept it. The reason against hashing client-side is just ease of use. If I hash client-side I need to use two separate libraries for hashing. This is not an unsurmountable problem, but it is a nuisance. Is there a safety gain in using client-side hashing? Why? Should I also be using challenge-response then? UPDATE: what interests me the most is this - do these techniques (client-side hashing, request-response) add any significant security gain in case where https is used? If so, why?", "question_score": 176, "question_tags": ["web-application", "passwords", "tls", "authentication", "hash"], "choices": {"A": "This is the simplest way of performing host discovery with nmap. nmap -sP 192.168.2.1/24 Why does it not work all the time ? When this command runs nmap tries to ping the given IP address range to check if the hosts are alive. If ping fails it tries to send syn packets to port 80 (SYN scan). This is not hundred percent reliable because modern host based firewalls block ping and port 80. Windows firewall blocks ping by default. The hosts you have on the network are blocking ping and the port 80 is not accepting connections. Hence nmap assumes...", "B": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "C": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "D": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/8596/https-security-should-password-be-hashed-server-side-or-client-side"} +{"id": "cybersecurity_12332", "domain": "cybersecurity", "question_title": "Where to store a server side encryption key?", "question_body": "I have some data that is symmetrically encrypted with a single key in my database. Rather than hard coding it into my code, I am looking for a safer way to store the encryption key. Where can I safely store it?", "question_score": 176, "question_tags": ["encryption", "key-management"], "choices": {"A": "Here are your possibilities, roughly in decreasing order of sophistication. Use an external Hardware Security Module. There is an entire industry of products designed for offloading security-sensitive operations to external devices. This doesn't solve the problem so much as relocate it, but it relocates it to device that is far more secure, so altogether it's a security win. If you're doing anything high-stakes, then this is almost certainly going to factor into your solution. Tie the encryption to your hardware. In theory HSMs do precisely this, only we tend to expect a bit more sophistication from an HSM than just...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "In SSH, two algorithms are used: a key exchange algorithm (Diffie-Hellman or the elliptic-curve variant called ECDH) and a signature algorithm. The key exchange yields the session key which will be used to encrypt data for that session. The signature is so that the client can make sure that it talks to the right server (another signature, computed by the client, may be used if the server enforces key-based client authentication). ECDH uses a curve ; most software use the standard NIST curve P-256. Curve25519 is another curve, whose \"sales pitch\" is that it is faster, not stronger, than P-256...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/12332/where-to-store-a-server-side-encryption-key"} +{"id": "cybersecurity_52361", "domain": "cybersecurity", "question_title": "Is Adblock (Plus) a security risk?", "question_body": "My email-provider's website ( http://www.gmx.de ) recently started linking to the (German) site http://www.browsersicherheit.info/ which basically claims that due to its capabilities to modify a site's appearance, Adblock Plus (and others) might actually be abused for phising. Here's a quote from that site plus its translation: Solche Add-ons haben Zugriff auf alle Ihre Eingaben im Browser und können diese auch an Dritte weitergeben – auch Ihr Bank-Passwort. Dies kann auf allen Web-Seiten passieren. Sicherheitsmechanismen wie SSL können das nicht verhindern. translated: Such addons can access all your browser's input and can also forward them to third parties - even your banking password. This can happen on all websites. Security mechanisms such as SSL cannot avoid that. Ok, they mention other (pretty obviously crapware) addons, but is Adblock Plus really a security threat or do that site's operators simply use the opportunity to try and scare inexperienced users into viewing their ads again?", "question_score": 171, "question_tags": ["web-browser", "phishing", "browser-extensions", "threats"], "choices": {"A": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "B": "It is not. This is a FUD ( fear, uncertainty, and doubt ) campaign by GMX because they want to display their ads. There is absolutely no security risk from the mentioned ad blockers. They added some crapware to the list to make it look more legitimate. Of course such campaigns are very unusual, especially from such a big and well known company like GMX. Unfortunately, I have no English source at hand (because it's a German only campaign) but since you speak German you may want to read this article at heise.de . Update #1: United Internet, the company...", "C": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "D": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/52361/is-adblock-plus-a-security-risk"} +{"id": "cybersecurity_209448", "domain": "cybersecurity", "question_title": "GitLab account hacked and repo wiped", "question_body": "I was working on a project, a private repo , and suddenly all the commits disappeared and were replaced with a single text file saying To recover your lost code and avoid leaking it: Send us 0.1 Bitcoin (BTC) to our Bitcoin address 1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA and contact us by Email at admin@gitsbackup.com with your Git login and a Proof of Payment. If you are unsure if we have your data, contact us and we will send you a proof. Your code is downloaded and backed up on our servers. If we dont receive your payment in the next 10 Days, we will make your code public or use them otherwise. At the time of this happening, Google search didn't show up anything, but in an hour or so this started coming up. I am using SourceTree (always up-to-date) but somehow I doubt that SourceTree is the issue, or that my system (Windows 10) was compromised. I'm not saying it's not that, it's just that I doubt it. This happened only to one of my repositories (all of them private) and all the others were left untouched. I changed my password, enabled 2 factor authentication, removed one access token that I wasn't using for years and wrote an email to GitLab in the hopes that they could tell me something about where/who the attacker got in. My password was a weak one that could've been relatively easily cracked via brute-force (it's not a common one but starts with \"a\" and has only a-z characters in it) and it could be that they just automatically checked if they can access the account and then ran some git commands. It is also possible that my email address and that particular password are on a list of leaked accounts. One might argue that if this is how they got in, they would've simply changed the account credentials but searching the Internet revealed that in these cases GitLab/GitHub will simply restore the credentials for you, and so I assume this is why they didn't do it this way. Could've also been that old access token, I can't remember what and where I used it for in the past - most likely generated for use on a computer I previously owned, so I doubt that that was the issue. There are also 4 developers working on it, all having full access to the repository, so their accounts being compromised is also a possibility. I've scanned my computer with BitDefender and couldn't find anything but I am not doing shady things on the internet so I don't think that me being infected with a malware/trojan is what caused this. I am waiting for an answer from GitLab and maybe they can shed some light on this. I have the code base on my local Git, so that is not an issue, but I am not pushing the code back to the repository just yet. Also, just in case the code gets published somewhere, I will change any passwords that are to be found in the source (databases, IMAP accounts) UPDATE I found out that the code isn't gone. I tried accessing a commit's hash and it worked. So the code is there but there's something wrong with the HEAD. My knowledge on this is very limited but git reflog shows all my commits. What this means to me is that the attackers most likely didn't clone the repositories (would be a logistical nightmare to do this for all the victims, anyway) and that the chances for them going over the source code looking for sensitive data, or of making the code public are low. It also means to me that is not a targeted attack but a random, bulk attack, carried out by a script. I really hope this is the case for our own sake! UPDATE 2 So, if you do git checkout origin/master you will see the attacker's commit git checkout master you will see all your files git checkout origin/master git reflog # take the SHA of the last commit of yours git reset [SHA] will fix your origin/master...but git status now will say HEAD detached from origin/master still searching for a fix on this UPDATE 3 If you have the files locally, running git push origin HEAD:master --force will fix everything. See Peter 's comment So, the question is what commands will get my repository back to the previously working state assuming you don't have the repo locally, as for how the attacked got in, I am hoping that the answer from GitLab (if any) will help us more. There is a discussion going on here The attack targets GitHub, BitBucket and GitLab accounts. Here 's the magnitude on GitHub's public repos", "question_score": 171, "question_tags": ["account-security", "ransomware", "intrusion", "github"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "C": "You can use git reflog in a clone and checkout the last commit before this happened. It happened because .git/config on your webserver (in the directory of the cloned repo) includes the remote URLs and people added username:password in it which should never be the case - people should use SSH, deploy keys or authenticate on each pull. Never store your credentials in a config file. Use the credential helper(s). Source: https://www.reddit.com/r/git/comments/bk1eco/comment/emg3cxg hello, it is me , the guy with your backups .. i will reveal your sins Here is an article from 2015, its more detailed, https://en.internetwache.org/dont-publicly-expose-git-or-how-we-downloaded-your-websites-sourcecode-an-analysis-of-alexas-1m-28-07-2015/ Article by...", "D": "TL,DR: Don't. (My-)SQL permissions are pretty fine-grained, so I'd wager there shouldn't be any obvious security issues Even with permission on the record level, it does not scale easy. If a user has irrestricted SELECT on a table, they can select any record on that table, even those not belonging to them. A salary table would be a bad one. If any user has DELETE or UPDATE , they may forget the WHERE clause, and there goes your table. It happens even to DBAs, so why would it not happen to a user? Performance should be way better, since we..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/209448/gitlab-account-hacked-and-repo-wiped"} +{"id": "cybersecurity_214492", "domain": "cybersecurity", "question_title": "Password management for kids - what's a good way to start?", "question_body": "Consider a young (primary-school age) child who is starting to collect passwords for online services. How can a parent (or equivalent) help them manage their passwords? An example to make things clearer: My daughter might want to log on to http://scratch.mit.edu from several locations/devices to show her projects to the family. She also has a couple of email addresses, one of which she's likely to be using herself soon (under supervision). While her own device will be logged in, she may need access from others. So far I take care of it for her: I know her password and (pseudonymous) user ID, and store them in my KeePass. That's appropriate at this stage, but it's not much help if she needs them without me (short of sending login details in plaintext to her grandparents, for example). There should also be a solution that doesn't require me to possess these details, from the point of view of sticking to the general rule of keeping your login details secret. Memorising a really strong master password is probably a bit much to ask, and she's likely to mislay any physical storage. I like to plan ahead, so moving forwards: What's the best approach to take for a young, fairly bright child, to keep logins safe and train good practice in advance of more important accounts?", "question_score": 170, "question_tags": ["password-management"], "choices": {"A": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "B": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "C": "Maybe the lesson for children should be less about how to use tools to manage a password, and more about understanding why managing passwords is important? Let them write their passwords in a notebook. Have fun with devising a method for obfuscation in case the notebook is lost. Teach them about backups- keeping a copy someplace safe. In my experience, kids and old people are a lot alike when it comes to password (mis)management Until they were skilled enough to manage their own password database, I also kept the kids logins in a \"family KeePass\". This is the same one...", "D": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/214492/password-management-for-kids-whats-a-good-way-to-start"} +{"id": "cybersecurity_137098", "domain": "cybersecurity", "question_title": "Should I be concerned if the "FBI" has logged onto my Ubuntu VPS?", "question_body": "Yesterday, I was performing a bit of general maintenance on a VPS of mine, using the IPMI console my host provided. Upon setting up SSH keys again via the IPMI console, I logged in via SSH and was shocked to see this: Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 2.6.32-042stab116.2 x86_64) Documentation: https://help.ubuntu.com/ Last login: Sat Sep 17 04:39:57 2016 from ic.fbi.gov Immediately, I contacted my hosting company. They said that they didn't know why this might be, and that it's possible the hostname was spoofed. I did a bit more digging, and resolved ic.fbi.gov to an IP address. I then ran this on the system: last -i This returned my IP address, and then two other IP addresses which were unknown to me. I geoIP'd these two IP addresses. One of them was a VPN and the other was a server from a hosting company in the state of Washington. Again, the IP that I resolved ic.fbi.gov to was not on the list. Do you think I should be concerned/worried about the \"FBI\" obtaining access to my VPS? Or is it just a hacker that spoofed the hostname?", "question_score": 169, "question_tags": ["linux", "ssh", "spoofing", "system-compromise"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that...", "D": "An IP address can be set up in DNS to resolve to any host name, by whoever is in control of that IP address. For example, if I am in control of the netblock 203.0.113.128/28, then I can set up 203.0.113.130 to reverse-resolve to presidential-desktop.oval-office.whitehouse.gov . I don't need control of whitehouse.gov to do this, though it can help in some situations (particularly, with any software that checks to make sure reverse and forward resolution matches ). That wouldn't mean that the president of the United States logged into your VPS. If someone has access to your system, they can..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/137098/should-i-be-concerned-if-the-fbi-has-logged-onto-my-ubuntu-vps"} +{"id": "cybersecurity_379", "domain": "cybersecurity", "question_title": "What are rainbow tables and how are they used?", "question_body": "Where can I find one? Is there a pot of gold at the end? How do I protect against them? From the Area51 proposal This question was IT Security Question of the Week . Read the Sep 09, 2011 blog entry for more details or submit your own Question of the Week.", "question_score": 168, "question_tags": ["cryptography", "hash", "attacks", "attack-prevention", "rainbow-table"], "choices": {"A": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match...", "B": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "C": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could...", "D": "What is the Poodle vulnerability ? The \"Poodle\" vulnerability, released on October 14th, 2014 , is an attack on the SSL 3.0 protocol. It is a protocol flaw, not an implementation issue; every implementation of SSL 3.0 suffers from it. Please note that we are talking about the old SSL 3.0, not TLS 1.0 or later. The TLS versions are not affected (neither is DTLS). In a nutshell: when SSL 3.0 uses a block cipher in CBC mode, the encryption process for a record uses padding so that the data length is a multiple of the block size. For instance,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/379/what-are-rainbow-tables-and-how-are-they-used"} +{"id": "cybersecurity_21168", "domain": "cybersecurity", "question_title": "How does Amazon bill me without the CVC / CVV / CVV2?", "question_body": "The card in question is a VISA, if that's of any importance. I've noticed this only on Amazon. All other sites I've purchased something from, ever , have needed the CVC code for the card. However, I know I never entered the CVC on Amazon when I added my card to it, and this has been bugging me ever since. How do they successfully charge the card without the CVC code?", "question_score": 167, "question_tags": ["credit-card"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "That code isn't necessary. This may cause more fraud and more chargebacks, but Amazon keeps those numbers low so that they can offer a faster shopping experience such as one-click. The only thing necessary to make a purchase is the card number and, in all but rare cases, expiration date, whether in number form or magnetic. Most systems require more information (such as matching full name, bank phone number, physical billing address with zip code, et al) so that they can deal with fraud and/or chargebacks, and sometimes this is enforced by the issuing bank."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/21168/how-does-amazon-bill-me-without-the-cvc-cvv-cvv2"} +{"id": "cybersecurity_24195", "domain": "cybersecurity", "question_title": "How do you explain the necessity of "nuke it from orbit" to management and users?", "question_body": "When a machine has been infected with malware, most of us here immediately identify the appropriate action as \"nuke it from orbit\" - i.e. wipe the system and start over. Unfortunately, this is often costly for a company, especially if backups are configured in a less-than-optimal fashion. This can produce resistance from management and users who just want to carry on using the machine for work. After all, as far as they're concerned, they can \"just run AV over it\" and everything will be fine. How do you explain the problem to management and users of a non-technical nature? I could easily produce a technical reason, but I'm having trouble coming up with the appropriate wording for non-technical users. I'd especially appreciate any way of speaking that the recipient can identify with, e.g. appealing to a manager's sense of risk management.", "question_score": 167, "question_tags": ["malware", "antivirus", "risk-management", "user-education", "system-compromise"], "choices": {"A": "WannaCry attacks are initiated using an SMBv1 remote code execution vulnerability in Microsoft Windows OS. The EternalBlue exploit has been patched by Microsoft on March 14 and made publicly available through the \"Shadowbrokers dump\" on April 14th, 2017. However, many companies and public organizations have not yet installed the patch to their systems. The Microsoft patches for legacy versions of Windows were released last week after the attack. How to prevent WannaCry infection? Make sure that all hosts have enabled endpoint anti-malware solutions. Install the official Windows patch (MS17-010) https://technet.microsoft.com/en-us/library/security/ms17-010.aspx , which closes the SMB Server vulnerability used in this...", "B": "Originally from serverfault. Thanks to Robert Moir (RobM) It's hard to give specific advice from what you've posted here but I do have some generic advice based on a post I wrote ages ago back when I could still be bothered to blog. Don't Panic First things first, there are no \"quick fixes\" other than restoring your system from a backup taken prior to the intrusion, and this has at least two problems. It's difficult to pinpoint when the intrusion happened. It doesn't help you close the \"hole\" that allowed them to break in last time, nor deal with the...", "C": "In my experience management doesn't like to listen to clever analogies. Depending on the person they care about the bottom line in dollars or hours of productivity. I would explain: The actual bottom line is that a compromise of our data will cost the company approximately X dollars + Y hours to recover. This is Z% likely to happen given the malware that is on this machine. A new install will cost A dollars + B hours to recover. You pick the appropriate action. It's short and clear and doesn't really leave them any room to argue. They will clearly...", "D": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/24195/how-do-you-explain-the-necessity-of-nuke-it-from-orbit-to-management-and-users"} +{"id": "cybersecurity_187912", "domain": "cybersecurity", "question_title": "What does it mean to "burn a zero-day"?", "question_body": "I noticed a comment on this answer where another user said ...but it requires risking burning a 0day, which people are not always all that willing to do. I did an Internet Search for the phrase \"burning a 0day\" (and similar permutations like 0 day, zero day, etc) and not much came back. It's obvious that \"burn\" means \"use up\" in this case. I understand most of what the user meant, but probably not all of why it was important (aka context). I'm looking for a canonical answer, with some reasoning about why \"burning a zero-day\" is an expensive thing. Mr Robot s01e06 touches on this when Elliot and Darlene start to argue about what went wrong in their attempted hack. I found some other people on this SE using the same terminology: Answer: https://security.stackexchange.com/a/184541/71932 Answer: https://security.stackexchange.com/a/184217/71932 Answer: https://security.stackexchange.com/a/162416/71932 Answer: https://security.stackexchange.com/a/175535/71932 Answer: https://security.stackexchange.com/a/182288/71932 Comment on this answer: Do drive-by attacks exist in modern browsers?", "question_score": 166, "question_tags": ["terminology", "zero-day"], "choices": {"A": "I was the one who wrote the comment you quoted. Quick answer: A 0day is burned when the exploit is used too often or haphazardly, resulting in it being discovered and patched. Virtually every time a 0day is used, it risks being burned. Using a 0day more sparingly and cautiously can increase its shelf life. The idiom intends to compare a 0day to a non-renewable resource like combustible fuel that loses its value when used up. This likely originates from the idiom burn your bridges : To destroy one's path, connections, reputation, opportunities, etc., particularly intentionally. What is a 0day?...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/187912/what-does-it-mean-to-burn-a-zero-day"} +{"id": "cybersecurity_115461", "domain": "cybersecurity", "question_title": "I found unknown PHP code on my server. How do I de-obfuscate the code?", "question_body": "We've been getting a lot of noise regarding hacked PHP files here, and it's taking a lot of time to answer these questions. In many cases, they are off-topic. We've had a discussion about this on Information Security Meta, and many people want these posts to stay. However, nearly every single post about obfuscated PHP can be answered in almost the same way. I think we can condense the majority of the methods for de-obfuscating hacked files into one single question & answer thread. This leads to the question many people are asking: how do I de-obfuscate malicious PHP code that I found on my server, how did it happen, and what do I do?!", "question_score": 164, "question_tags": ["php", "incident-response", "obfuscation", "websites"], "choices": {"A": "Fortunately, almost all PHP scripts can be deobfuscated with 4 simple methods. We're going to use these four methods to create a canonical answer. Before we begin, let's collect a list of common tools that assist in deobfuscating these malicious files so we can do the work ourselves. Common tools that aid in deobfuscation UnPHP . This is a link to the Wayback Machine archive of the site. It appears that there may be malware at the actual site as at 2024-11-29. This greatly aids in de-obfuscating scripts that have nested obfuscation in excess of 100 nested functions. In many...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/115461/i-found-unknown-php-code-on-my-server-how-do-i-de-obfuscate-the-code"} +{"id": "cybersecurity_185908", "domain": "cybersecurity", "question_title": "Why is Mother’s Maiden Name still used as a security question?", "question_body": "From time to time, some web sites asks to enter a security question and an answer for it. The question list is standard and it usually includes \"What is your mother's maiden name?\". Some people use their mother's real maiden name so that they are sure they can remember what to provide when asked (e.g. as part of the process to recover the account). This means that this is information is fixed for a very long period of time. If it happens that some web application is hacked and such an answer is associated with an e-mail address (or worse, with personally identifiable information), it can potentially create a vulnerability for other web applications. Also, mother's maiden name might be shared in public space. Assuming above issues with this security question (or any other security question that relies on a constant within one's life): Why is Mother’s Maiden Name still used as a security question?", "question_score": 164, "question_tags": ["authentication", "secret-questions"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the...", "C": "Because people are lazy and/or incompetent. And, well, you know, the Internet is full of chimpanzees . I would argue that all security questions are bad, but using the mother's maiden name is exceptionally bad: At least in Sweden, I can find out anyone's maiden name just with a simple call to the tax office. It is literally public information. It's 2018, and fairly common for couples to adopt the bride's name when getting married. Your mothers maiden name is then your surname. Great. Luis Casillas rightly adds: There are dozens of countries, with billions of inhabitants between them, where...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/185908/why-is-mother-s-maiden-name-still-used-as-a-security-question"} +{"id": "cybersecurity_8264", "domain": "cybersecurity", "question_title": "Why is the same origin policy so important?", "question_body": "I can't really fully understand what same origin domain means. I know it means that when getting a resource from another domain (say a JS file) it will run from the context of the domain that serves it (like Google Analytics code), which means it can't modify the data or read the data on the domain that \"includes the resource\". So if domain a.com is embedding a js file from google.com in its source, that js will run from google.com and it can't access the DOM\\cookies\\any other element on a.com -- am I right? Here is a definition for the same origin policy which I can't really understand: The same-origin policy is a key mechanism implemented within browsers that is designed to keep content that came from different origins from interfering with each other. Basically, content received from one website is allowed to read and modify other content received from the same site but is not allowed to access content received from other sites. What does that really mean? Can you please give me a real life example? Another question is: what is the purpose of Origin header and how do cross domain requests still exist? Why doesn't it influence the security or the same origin policy?", "question_score": 163, "question_tags": ["web-application", "web-browser", "javascript", "same-origin-policy"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "Why is the same origin policy important? Assume you are logged into Facebook and visit a malicious website in another browser tab. Without the same origin policy JavaScript on that website could do anything to your Facebook account that you are allowed to do. For example read private messages, post status updates, analyse the HTML DOM-tree after you entered your password before submitting the form. But of course Facebook wants to use JavaScript to enhance the user experience. So it is important that the browser can detect that this JavaScript is trusted to access Facebook resources. That's where the same...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/8264/why-is-the-same-origin-policy-so-important"} +{"id": "cybersecurity_116139", "domain": "cybersecurity", "question_title": "What is DROWN and how does it work?", "question_body": "There is a new recent attack \"on TLS\" named \"DROWN\" . I understand that it appears to use bad SSLv2 requests to recover static (certificate) keys. My question is: How? How can you recover static encryption or signature keys using SSLv2? Bonus questions: How can I prevent the attack from applying to me as a server admin? How could the attack spawn in the first place?", "question_score": 161, "question_tags": ["tls", "openssl", "attack-prevention"], "choices": {"A": "This is commonly known as a capability URL / secret URL. It's secure in modern websites but not suitable for all applications and requires significant care to use . You can find an excellent overview of their advantages, risks and best practices in this page by W3C . It's meaningless to talk about security without specifying a threat model. Here are a couple that come to mind: 1: A passive attacker on the network (eavesdroping) 2: An active attacker on the network (can change packets at will, mitm, etc) 3: A shoulder-surfer 4: An attacker with physical access to your...", "B": "To understand the attack, one must recall Bleichenbacher's attack from the late 20th century. In that attack, the attacker uses the target server as an oracle . When using RSA-based key exchange, the client is supposed to send a secret value (the \"pre-master secret\") encrypted with the server's public key, using PKCS#1 v1.5 padding (called \"type 2\"). Bleichenbacher's attack relied on sending carefully crafted values in lieu of a properly encrypted message, and observe the server's reaction. The server might respond (most of the time) with an error saying \"I processed that but it did not yield a proper PKCS#1...", "C": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "D": "The analogy of the bank and bank employee You call the bank to request a new bank account, to make an appointment - whatever. Somehow you and the bank make sure that you are who you are, and the bank is actually the bank. This is the TLS process that secures the connection between you and the bank, and we assume this is handled properly. The roles in this play The bank: a webserver The bank employee: the OpenSSL service for that server You (the bank robber): a bot fetching all it can get from that server Staying connected -..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/116139/what-is-drown-and-how-does-it-work"} +{"id": "cybersecurity_102873", "domain": "cybersecurity", "question_title": "How can USB sticks be dangerous?", "question_body": "We all know the story of the USB drive left outside a power plant which was found by a worker and inserted into a computer to see the contents which then allowed a hack to ensue. Here is my question, how? I get that code is executed but how? I would really like to be able to do this (for my own curiosity of course). I have always had a good grasp on security how to make things secure etc etc but things like viruses, trojans, USB drivers... how are they activated with little human interaction? I would really like to learn about these things, I am a programmer/sys admin so would like to knock up a script but having never been taught or never have done it I don't know how or where to begin. I would really like a big discussion on this with as much information as possible.", "question_score": 160, "question_tags": ["malware", "virus", "usb-drive"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "Take a look at this USB keyboard : \"But that's not a keyboard! That's an USB drive, silly!\" Actually, no. It looks like a USB drive to you, but when it gets connected to a computer, it will report that it is a USB keyboard. And the moment it is installed, it will start typing key sequences you programmed on it beforehand. Any operating system I know automatically trusts USB keyboards and installs them as trusted input devices without requiring any user interaction the moment they are connected. There are various payloads available for it. For example, there is one...", "C": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "D": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/102873/how-can-usb-sticks-be-dangerous"} +{"id": "cybersecurity_127092", "domain": "cybersecurity", "question_title": "Hardening Linux desktop machine against people from my household", "question_body": "I am looking to make a clean install of a Debian system on my home desktop. To clarify, I am switching from Windows and wish to use it as my day-to-day home OS - I'm not going to be running any servers or anything like that. I also have reason to believe that some members of my household (who have physical access to my machine) would try to gain access to it, and look through my data or possibly even install a keylogger. For the purpose of this question, please ignore the social aspects, except for the fact that I cannot act openly confrontational, so e.g. locking my room to prevent anyone accessing my PC is not an option. The people I want to protect against are technologically literate; they know their way around linux even if they may lack much experience with it, and if something can be found with some googling and takes maybe an hour or two of messing around then it's most likely going to get attempted. That said, I am pretty certain that acquiring specialist equipment is not something they would bother with, which means that I don't have to worry about most hardware attacks, e.g. a keyboard keylogger or bug on my mobo / RAM sniffer / whatever. One other thing is that I have a Windows 7 system to which they have admin access (so it can be considered compromised). This is one of the reasons I am switching to Linux; however, I'd like to keep a dual-boot system rather than removing Windows outright. I am aware that this would allow an attacker to outright nuke my Linux partition, and that is a risk I'm willing to take. I am not concerned with securing my Windows system. I am aware it's compromised and don't really care what happens to it. As I mentioned, other people have accounts on my Windows system and occasionally use it (for legitimate reasons!). I am certainly looking to secure my Linux installation, but preventing access to Windows has no point unless it contributes to the security of the Linux part of my machine. In fact, I'd rather avoid limiting access to Windows if possible because I don't want to appear paranoid or create conflict in the household. Full-disk encryption will prevent anyone from actually accessing my data from outside my Linux installation itself, which should then take care of both the Windows system and even make booting from a USB drive mostly useless (I am quite certain that the people in question do not have the resources or the motivation to decrypt a well-encrypted drive). I will also need to password-protect the single-user mode, of course. What other things would I need to do to secure my system? I am handy with the command line and willing to get my hands dirty, but I have limited Linux experience and fragmentary knowledge of computer security. The choice of Debian is largely arbitrary and I would have no problem trying out a different distro if it would be better in my case. If there's anything I've missed, or if you have tips on things I mentioned (e.g. best practices for disk encryption?), then I would be glad to hear them. I do not believe this question is a duplicate because all of the other questions I found on securing Linux on this site concern themselves with remote attackers and protection against viruses and exploits. They certainly have good answers but that is not the kind of information I am looking for here. Another question has been brought to my attention when my post was flagged as duplicate. However, that one asks in general whether their machine is secure when others have physical access to it; the answers to it generally boil down to \"Physical access = game over\" and provide some tips to mitigate various attacks (including things such as rearview mirrors on your monitor). Many of those tips are not applicable here, since I am aware that unlimited physical access means the machine isn't mine anymore in theory, and hence I provide some limitations to the attackers in my threat model which fit my personal scenario.", "question_score": 160, "question_tags": ["linux", "privacy", "physical-access"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Use a strong and difficult password for the root user. Secondly, always login and work from another user with no administrative rights (and also a strong password). Enable the BIOS password option. Every time you power on your computer, the BIOS itself will ask you for a password before even booting on. It will also prevent everyone from applying changes to the BIOS setup. Encrypt every partition of your hard drive (check cryptsetup for Debian - if it can't encrypt you Windows partition, too, use TrueCrypt (from Windows for your Windows)) Watch out for external hardware devices connected on your...", "C": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a...", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/127092/hardening-linux-desktop-machine-against-people-from-my-household"} +{"id": "cybersecurity_52834", "domain": "cybersecurity", "question_title": "What exactly does it mean when Chrome reports 'no certificate transparency information was supplied by the server?'", "question_body": "When visiting Gmail in Chrome, if I click on the lock icon in the address bar and go to the connection tab, I receive a message 'no certificate transparency information was supplied by the server' (before Chrome 45, the message was displayed as 'the identity of this website has been verified by Google Internet Authority G2 but does not have public audit records'). What exactly does it mean that the certificate does not have public audit records? Are their certain threats a site using a certificate without public audit records has that a site using a certificate with public audit records does not?", "question_score": 159, "question_tags": ["certificates", "chrome"], "choices": {"A": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "B": "Note : If you're here because your certificate isn't trusted by Chrome, this is not the reason. Chrome will still trust certificates without CT information. If your certificate isn't trusted, there is an additional factor that you may have missed. This has to do with the concept of Certificate Transparency . The Problem Browsers currently trust certificates if four conditions are met: (a) the certificate is signed by a trusted CA, (b) the current time is within the valid period of the certificate and signing certs (between the notBefore and notAfter times), (c) neither the certificate nor any signing certificate...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/52834/what-exactly-does-it-mean-when-chrome-reports-no-certificate-transparency-infor"} +{"id": "cybersecurity_151300", "domain": "cybersecurity", "question_title": "What is the safest way to deal with loads of incoming PDF files, some of which could potentially be malicious?", "question_body": "As an investigative journalist I receive each day dozens of messages, many of which contain PDF documents. But I'm worried about some of the potentially malicious consequences of blindly opening them and getting my computer compromised. In the past, before I started working in investigative journalism, I was using virustotal.com to analyze all files (including PDFs) coming to my inbox, but that's not possible in this case as the files will be sent to them when they're meant to be confidential before release. And I heard that antivirus solutions are not 100% foolproof. What is the safest way to deal with loads of incoming PDF files, some of which could potentially be malicious?", "question_score": 159, "question_tags": ["malware", "virus", "antivirus", "antimalware", "pdf"], "choices": {"A": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP...", "D": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/151300/what-is-the-safest-way-to-deal-with-loads-of-incoming-pdf-files-some-of-which-c"} +{"id": "cybersecurity_180561", "domain": "cybersecurity", "question_title": "Is "Have I Been Pwned's" Pwned Passwords List really that useful?", "question_body": "My understanding of Have I Been Pwned is that it checks your password to see if someone else in the world has used it. This really doesn't seem that useful to me. It seems equivalent to asking if anyone in the world has the same front door key as me. Statistically, I would assume yes, but without knowing where I live... who cares? So have I misunderstood what HIBP does or am I underestimating its value because I'm misunderstanding some principle of security? EDIT Turns out there was more to the site than I understand. I was referring specifically to the password feature .", "question_score": 159, "question_tags": ["passwords", "have-i-been-pwned"], "choices": {"A": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them...", "D": "Lots of examples. A high-profile and recent example is when Kanye was caught on camera entering his \"00000\" password to unlock his device. Shoulder-surfing is one reason why applications do not display the password text on the screen, but show ****** instead. And this is one reason why multi-factor authentication is so important; even if you know the password, you cannot use it without another factor. I have even seen viable research into capturing the sound of the keyboard when a user types the password, even over the computer's microphone . So, yes, you describe a viable risk that the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/180561/is-have-i-been-pwneds-pwned-passwords-list-really-that-useful"} +{"id": "cybersecurity_183658", "domain": "cybersecurity", "question_title": "4-dial combination padlock: Is it more secure to zero it out or to blindly spin the dials after locking?", "question_body": "I am partially responsible for some resources protected by a 4-dial combination lock like this one : There are two things that people will usually do after they've locked it: reset all the digits to 0, so that the combination reads 0000, or mash around on the dials a bit so that the combination reads something else. I have a strong feeling that there is no functional difference between the two, but I am encouraged to set a best practice. So, assuming that the lock has a random combination and is practically unbreakable without entering the correct combination, which approach is more secure?", "question_score": 156, "question_tags": ["physical", "locks", "padlocks"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "In theory zeroing or any predetermined sequence is more secure as you could, in theory make a guess at how far someone might move the dials. It is also conceivable that if you were able to check the state of the dials when locked on enough different occasions then you could narrow down the likely combination if it is being reset in a similar manner each time. In practice this is probably a bit far fetched and anything with a combination lock probably has larger concerns eg the combination being known by too many people or the fact that any...", "C": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "D": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/183658/4-dial-combination-padlock-is-it-more-secure-to-zero-it-out-or-to-blindly-spin"} +{"id": "cybersecurity_202026", "domain": "cybersecurity", "question_title": "Does pressing a car remote many times offer denial of service attack for rolling codes?", "question_body": "My understanding of remote car key fobs, and similar security devices with rolling codes, is that the key device is a transmitter that, each time the button is pressed, sends the next secret in a known sequence that is unique to the key. It does not contain a receiver. Meanwhile, the receiver in the car tracks (for each key fob it recognises) what it expects the next secret to be, and only unlocks if it receives the correct code. There is a risk that a transmission maybe lost - e.g. the button pressed when out of range - so the receiver actually accepts any of the next few secrets in the sequence. I have heard of one system that allowed a window of up to 256, but I don't know if that number is correct and whether it is typical. If my understanding is correct, it is possible to render a key fob useless (i.e. perform a denial of service attack on the owner) by pressing the button at least 256 times while out of the range of the car. This obviously relies on access to the key fob, but not when the car is close - which is a time the user may be less vigilant. So, if a friend gets drunk in a pub, I can make sure they can't drive home by rapidly pressing their car remote 300 times while they are in the bathroom. It has always bothered me that such an attack is possible, and yet I have never heard of anyone performing it, which makes me doubt that I have understood this completely.", "question_score": 156, "question_tags": ["wireless", "locks", "vehicle"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "it is possible to render a key fob useless by pressing the button at least 256 times while out of the range of the car. Not useless, but desynchronized. Any car will allow you to re-synchronize, and one example of a typical procedure is: Turn the ignition key on and off eight times in less than 10 seconds. This tells the security system in the car to switch over to programming mode. Press a button on all of the transmitters you want the car to recognize. Most cars allow at least four transmitters. Switch the ignition off. yet I have...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/202026/does-pressing-a-car-remote-many-times-offer-denial-of-service-attack-for-rolling"} +{"id": "cybersecurity_192244", "domain": "cybersecurity", "question_title": "If my password was able to be printed on a form sent home from my child's school, does it imply insecure password storage policies?", "question_body": "I have a user account for each of my children in our district website, which oversees registration, grades, identification, etc. I was recently sent home a form from both of my children's classrooms asking us to login to our accounts so we could sign a new school year form. Printed on this piece of paper was both the username and the password for our accounts. The security practice of sending home printed passwords is immediately discouraging, but my larger concern is how my password is stored in the district system (and ultimately, what would happen if that system were compromised). I want to contact the webmaster, but I want to make sure I'm correct in any assumptions I make prior to shooting off my email asking that action be taken to avoid this kind of thing. I saw a related question , and want to make sure I don't jump the gun on harassing them over their storage policies. -- Since it's been asked several times, this is a password that I set on the account, not an auto-generated password. Also, this is an account that parents control; it contains sensitive identifying information of your child. It's not intended as a student portal or anything like that. -- Update_1 : I got a call from the district webmaster today, wanting to discuss my email in more detail. I explained my concerns were two-fold: (a) the transmission of our password on a printed piece of paper, and (b) the ability to retrieve that password in the first place. I was informed that the system is a legacy system, and as such has no capability of allowing a \"forgot my password\" feature. While the policy, they agreed, is incorrect, the alternative is to have every parent who doesn't remember their password come into the school with an ID to retrieve their password. (I was also informed that since we're in a 60% poverty district, assuming all parents have an email address for password management isn't an option). While this is and incredible inconvenient, I explained the inconvenience of likewise having someone access my accounts because they had access to my password. I was also informed that the system is being replaced next year, which will come with more modern security features (though, I'm unsure of the storage policies on the future system). The lady was very polite, and offered to put me in contact with their director of IT to discuss my concerns around password storage policies, which I accepted. She also offered to BCC me on an email to our school principal, requesting that future communications be issued in a sealed format. Finally, I was slightly (and correctly) scolded for reusing my password in the first place.", "question_score": 155, "question_tags": ["passwords", "web-application"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "C": "I interpret your question as: What's the motivation for someone to use an alien Facebook account to play poker and stock it with chips? It's not that strange if you think about it this way: As poker is a game where knowledge about the dealt cards gives you a significant edge in the game, you'd like to use sock puppets at a table to know more about the card distribution. Thus, using sock puppets that are valid, active - real - Facebook accounts are the only way to gather more information without being spotted easily by heuristics. Düsseldorf is where...", "D": "Yup! If they are able to retrieve the password from the database, then they are clearly not following password storage best-practices. OWASP provides a good guide for how to do it properly: https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet Here's some ammunition you could use in that letter: You want me (the legal guardian of my child) to sign a form. You are using the action of logging into a website and clicking a button as a form of legal signature. How do you know it was actually me that logged in and clicked the button? How many people had access to the sheet with the..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/192244/if-my-password-was-able-to-be-printed-on-a-form-sent-home-from-my-childs-school"} +{"id": "cybersecurity_222839", "domain": "cybersecurity", "question_title": "Why is the OS obfuscation defense against "It's a Unix system!" not widely implemented?", "question_body": "The Jurassic Park scene referenced in the title is infamous for how ludicrous it sounds to those who are tech literate. But it also illustrates what seems to me to be a glaringly huge hole in web security, particularly IoT devices--as soon as attackers find out a server or camera or baby monitor is running linux, they instantly know volumes about how it works. They know that commands like sudo are big juicy targets and they know that shell access will bring with it gobs of useful tools like ls and cat . So why isn't OS obfuscation more of a thing? I'm not talking about just hiding the version in web headers. Similar to JavaScript minification or obfuscation, I'm talking about changing the names of binaries and filepaths in the OS itself. Wouldn't entire classes of attacks be practically useless if the OS had ha7TrUO and RRI6e29 commands instead of sudo and ls ? Imagine a hacker that somehow gained remote root access--what are they even going to do if they don't know any commands? Implementation would be fairly easy for compilers. Take the simplest case of \"rename this function and all calls to it.\" You could give an OS compiler and an application compiler the same randomized names and they'd be able to talk to each other. But even if the application has poor security and is vulnerable to bash injection, such attacks would be fruitless. Obviously this technique can't be used in all scenarios. Setting aside scenarios like servers maintained by human sysadmins, it seems to me that any device or server managed by automation is a prime candidate for this defense. I guess the question(s) needs to be a bit more concrete: Is OS obfuscation as described used widely and I just haven't encountered it? If not used widely, what are the practical or technical barriers to usage?", "question_score": 154, "question_tags": ["attack-prevention", "operating-systems"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "Before I tear your idea apart, let me say that it's a really interesting idea and it was super fun to think about. Please continue to think outside the box and ask interesting questions! Alright, let's do this! Let's take a step back and ask why that baby monitor is running Linux in the first place? What if there was no operating system and the application was written in bare microcontroller code (think arduino code)? Then there would be no sudo or ls or even a shell for the attacker to use, right? I'm not an expert here, but I...", "C": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "D": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/222839/why-is-the-os-obfuscation-defense-against-its-a-unix-system-not-widely-imple"} +{"id": "cybersecurity_111260", "domain": "cybersecurity", "question_title": "Is the BBC’s advice on choosing a password sensible?", "question_body": "In this article on the BBC’s website they offer advice on how to develop a password. The steps are as follows. Step 1: Choose an artist (a recording artist I presume) Lets choose as an example case study the teen idol and all round bad boy Justin Bieber.* Step 2: Choose a song. (The catcher the better) Next, I need to choose a song from the Biebs vast repertoire of classics. My particular favourite of his, is his insightful look into the dark world of controlling relationships “Boyfriend”. Step 3: Choose some lyrics Now I need some lyrics from “Boyfriend”, I'll go with the slightly menacing chorus. “ If I was your boyfriend, I'd never let you go ” Step 4, 5 and 6: Passwordify the lyric Now we need to take the Biebs prose and turn into a password. We do this by taking the first letter of each word in the lyric “If I was your boyfriend, I'd never let you go, I'd never let you go” iiwybinlyg Make it case sensitive: iIwyBiNlYg Turn it into 'leet speak' by changing it up with symbols and numbers: 1Iwy&1NlY9 My question isn't about the mathematical strength of passwords which obviously will depend on the lyric that is chosen and how one goes about passwordifying it, it is more about the the predictability of the total amount of possible passwords that are likely to pop up using this method. As we are all aware, humans can be very predictable creatures, it wouldn't take a huge amount of effort to generate dictionaries based on certain demographics, music genres, or targeted attacks based on profiling individuals. My initial thoughts on this was that this would be terrible advice to give out in a business as it would lead to many users using the same formula to develop their passwords, which would only be exacerbated by making the passwords more predictable. On a national scale this could be sound advice, which leads me to my question: Is the BBC’s advice on how to choose a password sensible, given how predictable we humans are? If so, in what scenarios is this sensible advice? *Justin Bieber used for humorous reasons only.", "question_score": 153, "question_tags": ["passwords", "password-policy", "password-cracking"], "choices": {"A": "Yep, that's a big problem, especially if that was your old password (i.e. not a newly assigned one). Technically, the password might be stored under reversible encryption rather than plain text, but that's nearly as bad. The absolute minimum standard should be a salted hash - anything less and anybody with access to the auth database who wants to can use an online rainbow table to get back the plaintext passwords in moments - but single-iteration secure hash algorithm (SHA) functions are still easy to brute force with a GPU (they're designed to be fast; a high-end GPU can compute...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "My question isn't about the mathematical strength of passwords which obviously will depend on the lyric that is chosen and how one goes about passwordifying it, it is more about the the predictability of the total amount of possible passwords that are likely to pop up using this method. This is a good question, and I'm going to depart from the norm here, put on my tinfoil hat, and say \"no, this is not a good idea.\" Why? Let's look at it in the context of the Snowden leaks. Because the GCHQ spies on all traffic on the British internet...", "D": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/111260/is-the-bbc-s-advice-on-choosing-a-password-sensible"} +{"id": "cybersecurity_143599", "domain": "cybersecurity", "question_title": "Can someone take down Wi-Fi signal?", "question_body": "Is it possible that someone made an attack (DoS or something else) to my Wi-Fi router (without knowing of the password) and make my router's signal unavailable? 1) How it can be done? 2) What are remedies?", "question_score": 153, "question_tags": ["wifi", "denial-of-service"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "There's a lot of ways you can attack a WiFi without knowing any passwords: Physical layer attacks: Simply jam the frequency spectrum with your own signal. That signal might just be noise, but it might also be a WiFi of your own under heavy load, with the nodes in that WiFi being configured not to play nice with others. (depending on the WiFi chipset, that can be extremely easy) Spectrum can only be used once! Tool : noise source (e.g. Gunn Diode, SDR device ), or normal AP Electromagnetic sledgehammer: EMI gun. Take microwave oven oscillator, attach directive antenna, pray...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/143599/can-someone-take-down-wi-fi-signal"} +{"id": "cybersecurity_9487", "domain": "cybersecurity", "question_title": "How can PayPal spoof emails so easily to say it comes from someone else?", "question_body": "When I receive a payment in PayPal, it sends me an email about it (pictured below). The problem is that the email is shown to be coming from the money sender's email address and not from PayPal itself, even though the real sender is PayPal. Here is the text that appears when I select \"show original\" in Gmail: From: \"contact@wxxxxxxxxx.com\" Sender: sendmail@paypal.com So you can see that the real sender is PayPal. If PayPal can spoof the email sender so easily, and Gmail does not recognize it, does it mean that anybody can spoof the email sender address and Gmail will not recognize it? When I send emails to Gmail myself using telnet, the email comes with the warning: This message may not have been sent by: xxxxx@xxxxx.com Is this a security issue? Because if I am used to the fact that payment emails in PayPal appear to come from the money sender's email and not from PayPal, then the sender can just spoof the payment himself by sending a message like that from his email, and I may think that this is the real payment. Is this something specific to PayPal, or can anybody fool Gmail like that? And if anybody can, what is the exact method that PayPal is using to fool Gmail?", "question_score": 152, "question_tags": ["email"], "choices": {"A": "IMPORTANT : this is based on data I got from your link, but the server might implement some protection. For example, once it has sent its \"silver bullet\" against a victim, it might answer with a faked \"silver bullet\" to the same request, so that anyone investigating is led astray. I have tried sending a fake parameter of cHVwcGFtZWxv to see whether it triggered any different behaviour, and it did not. Still, that's no great guarantee. UPDATE - the above still holds, but I've been making tests from random IPs not traceable to my main session - the attacking server...", "B": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale...."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/9487/how-can-paypal-spoof-emails-so-easily-to-say-it-comes-from-someone-else"} +{"id": "cybersecurity_10340", "domain": "cybersecurity", "question_title": "What alternatives are there when SSH is being actively filtered?", "question_body": "Unfortunately our government filters the SSH protocol so now we can't connect to our Linux server. They do the filtering by checking the header of each packet in the network layer (and not by just closing port). They also do away with VPN protocols. Is there any alternative way to securely connect to a Linux server?", "question_score": 152, "question_tags": ["ssh"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "An IP address can be set up in DNS to resolve to any host name, by whoever is in control of that IP address. For example, if I am in control of the netblock 203.0.113.128/28, then I can set up 203.0.113.130 to reverse-resolve to presidential-desktop.oval-office.whitehouse.gov . I don't need control of whitehouse.gov to do this, though it can help in some situations (particularly, with any software that checks to make sure reverse and forward resolution matches ). That wouldn't mean that the president of the United States logged into your VPS. If someone has access to your system, they can...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "From what I heard earlier today, https/ssl flows correctly through your borders. You should hence check out Corkscrew . Similarly to netcat , it's used to wrap ssh in https to allow the use of https proxies. Another solution would be to use LSH which, by having a different signature than ssh, works from Iran as Siavash noted it in his message ."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/10340/what-alternatives-are-there-when-ssh-is-being-actively-filtered"} +{"id": "cybersecurity_117605", "domain": "cybersecurity", "question_title": "What to do if stuck with website that has poor security?", "question_body": "I have a student loan account with a company, not the biggest company but big enough to where they should have their act together. Today I couldn't remember my password to log into my account dashboard. I clicked \"forgot password\" and they prompted me with 5 questions. First Name, Last Name, last 4-digit SSN, birthday, and zip code. All information that is easily acquirable if trying hard enough, not to mention all information that is included in their periodic emails about payments. Upon typing in the information the site responds saying I have been authenticated and gives me my password in plaintext. So now not only is it incredibly easy to retrieve lost password details, they dont even send it to your email they just display it on screen, on top of that they store the password in plaintext in the database. This is an account that has details of my multi-thousand dollar loan as well as my bank details for auto-payments. Fortunately the one detail not given is my username, which is my full SSN, so that is the last thread of security; however, if they store passwords unhashed I'm sure my SSN is not either, making this even worse. So my question is, given that this is a loan that I can't just up and leave is there/what are any precautions or steps that I can take to make this potentially more secure? Would it be worth emailing them and badgering them to upgrade their security or should I just pay as quick as possible and get out? If I do warn them, what types of threat should I say they are vulnerable to in hopes to scare them into a patch?", "question_score": 150, "question_tags": ["passwords", "account-security", "web"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "If you are concerned about the privacy of your password and thus your account (which should be the case), you should try to educate the customer service. The developer FAQ from the public shaming project for this kind of recklessness lists a few good points and is worth a read. Also, you should point out that you feel insecure and lose trust in the company and will make them liable for any problems that stem from this no-go. You should also document that behaviour and try to get a written quote on their point of view if they do not...", "D": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/117605/what-to-do-if-stuck-with-website-that-has-poor-security"} +{"id": "cybersecurity_188208", "domain": "cybersecurity", "question_title": "Do I need to encrypt connections inside a corporate network?", "question_body": "Provided that I have a decent level of physical security in the office, I monitor the physical addresses of devices connected to the network and only give VPN access to trusted parties, do I need to encrypt access to intranet resources over HTTP? There is an employee complaining that he doesn't like sending his credentials in plain text over the network and that he cannot take responsibility for his network identity in such case. What are the real world chances that someone would steal his identity? I can't find any clear-cut recommendations for encryption within a corporate network.", "question_score": 149, "question_tags": ["encryption", "credentials", "identity-theft", "intranet"], "choices": {"A": "Yes encrypt, it is easy. Plus according to a 2014 Software Engineering Institute study 1 in 4 hacks was from someone inside the company with an average damage 50% higher than an external threat actor. Link to source: https://insights.sei.cmu.edu/insider-threat/2017/01/2016-us-state-of-cybercrime-highlights.html Although this is the 2017 version.", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "D": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/188208/do-i-need-to-encrypt-connections-inside-a-corporate-network"} +{"id": "cybersecurity_103805", "domain": "cybersecurity", "question_title": "How do organizations check *what* has been hacked?", "question_body": "In the UK, the company TalkTalk was recently hacked . It was later discovered, after 'investigation' that the hack was not as serious as it could have been (and less than expected). I'm wondering: How do organizations (not necessarily TalkTalk -- that's just what prompted me to ask) check what has been hacked? I'm sure there are many ways; but what are the 'main' ones?", "question_score": 148, "question_tags": ["incident-response"], "choices": {"A": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "B": "In a word: Forensics . Computer forensics is the art of examining a system and determining what happened upon it previously. The examination of file and memory artifacts, especially file timelines, can paint a very clear picture of what the attacker did, when they did it, and what they took. Just as an example - given a memory dump of a Windows system, it is possible to extract not only the command lines typed by an attacker, but also the output that they saw as a result of running those commands . Pretty useful in determining impact, eh? Depending on...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/103805/how-do-organizations-check-what-has-been-hacked"} +{"id": "cybersecurity_197250", "domain": "cybersecurity", "question_title": "Is password entry being recorded on camera a realistic concern?", "question_body": "I live in a city where CCTV camera coverage is comprehensive and increasing. Cameras are getting cheaper and higher resolution. Everyone has a video camera in their pocket already, and we are starting to see trends which indicate always-on cameras may become commonplace in other devices like glasses. It has occurred to me, when out in public and entering my username/password into apps on my phone and laptop, that if a camera could capture both my screen and my keyboard, it could be fairly straightforward for a viewer to grab or guess my credentials from the footage assuming a high enough resolution image and the view not being (too) obscured. Without going too much into the details of how it would be implemented, the accuracy and cost etc, I have a background in image processing and so am also aware that this would likely be automatable to at least some degree. So I thought I would ask the community here if this is actually a viable risk? Have there been any known instances of it happening already? Are people thinking about this with respect to the viability of plaintext credential entry into apps in the long run?", "question_score": 148, "question_tags": ["passwords", "user-names"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "Lots of examples. A high-profile and recent example is when Kanye was caught on camera entering his \"00000\" password to unlock his device. Shoulder-surfing is one reason why applications do not display the password text on the screen, but show ****** instead. And this is one reason why multi-factor authentication is so important; even if you know the password, you cannot use it without another factor. I have even seen viable research into capturing the sound of the keyboard when a user types the password, even over the computer's microphone . So, yes, you describe a viable risk that the...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "Nothing prevents ads from reading your passwords. Ads (or any other script like analytics or JavaScript libraries) have access to the main JavaScript scope, and are able to read a lot of sensitive stuff: financial information, passwords, CSRF tokens, etc. Well, unless they're being loaded in a sandboxed iframe. Loading an ad in a sandboxed iframe will add security restrictions to the JavaScript scope it has access to, so it won't be able to do nasty stuff. Unfortunately, most of the third-party scripts are not sandboxed. This is because some of them require access to the main scope to work..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/197250/is-password-entry-being-recorded-on-camera-a-realistic-concern"} +{"id": "cybersecurity_229954", "domain": "cybersecurity", "question_title": "Why can't I just let customers connect directly to my database?", "question_body": "I'm pretty sure this is a stupid idea but I'd like to know why, so bear with me for a moment. Lots of the work backend developers do is providing CRUD access to customers via HTTP, essentially mapping data from and to the internal database. Customers authorize to the web service using some sort of credentials via an encrypted connection, the web service validates data and performs queries against the backend database, then returns the result to the client. All in all, this is merely a worse way to interact with the database directly: Almost nobody fully implements the REST specification, and sooner or later you always end up with home-cooked generic filtering, sorting or pagination - while SQL supports all of this already. That got me wondering: Why not give customers access to the database by exposing the SQL port, skipping the HTTP API entirely? This has lots of advantages: Clients must encrypt connections using a client certificate We can use the access control built into the server or just use shard databases per customer (My-)SQL permissions are pretty fine-grained, so I'd wager there shouldn't be any obvious security issues Performance should be way better, since we skip the entire HTTP communication and web app code New features are a matter of database migrations, everything is reflected in the schema Powerful query capabilities are provided to users, without any additional effort The downsides seem to include being unable to support multiple schema versions, even though I think careful deprecations (and client SDKs, maybe) should make the impact minimal. As nobody seems to do this, there must be a security risk I'm overlooking. Why can't we provide public SQL access to our customers? What could possibly go wrong? (Please keep in mind that this is just a thought experiment born out of curiosity)", "question_score": 147, "question_tags": ["account-security", "mysql", "api"], "choices": {"A": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "TL,DR: Don't. (My-)SQL permissions are pretty fine-grained, so I'd wager there shouldn't be any obvious security issues Even with permission on the record level, it does not scale easy. If a user has irrestricted SELECT on a table, they can select any record on that table, even those not belonging to them. A salary table would be a bad one. If any user has DELETE or UPDATE , they may forget the WHERE clause, and there goes your table. It happens even to DBAs, so why would it not happen to a user? Performance should be way better, since we...", "D": "You can use git reflog in a clone and checkout the last commit before this happened. It happened because .git/config on your webserver (in the directory of the cloned repo) includes the remote URLs and people added username:password in it which should never be the case - people should use SSH, deploy keys or authenticate on each pull. Never store your credentials in a config file. Use the credential helper(s). Source: https://www.reddit.com/r/git/comments/bk1eco/comment/emg3cxg hello, it is me , the guy with your backups .. i will reveal your sins Here is an article from 2015, its more detailed, https://en.internetwache.org/dont-publicly-expose-git-or-how-we-downloaded-your-websites-sourcecode-an-analysis-of-alexas-1m-28-07-2015/ Article by..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/229954/why-cant-i-just-let-customers-connect-directly-to-my-database"} +{"id": "cybersecurity_242906", "domain": "cybersecurity", "question_title": "How does Shutterstock keep getting my latest debit card number?", "question_body": "I've made a single photo purchase from Shutterstock back in 2012. I created an account and gave them my debit card #. I haven't made a single purchase from them since. Silently in 2018, they activated auto-renew without my consent, without notifying me via e-mail and without sending a receipt. They just started charging my new debit card. One that I hadn't even given them. This went on for 3 years without me noticing. Then in July 2020 I lost my wallet, so I requested a new card. Somehow, Shutterstock had my updated debit card number and was able to withdraw from my checking account again in 2021, without me giving them my new debit card info. I've never given them any of the newer card numbers since 2012. How is it possible for them to always have it? Is my banking information available somewhere for them to look up?", "question_score": 146, "question_tags": ["credit-card", "banks"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "Simply put, Account Updater : When participating issuers re-issue cards, they submit the new account number and expiration date to VAU. Participating merchants send inquiries on their credentials-on-file to VAU and are provided with updated card information, if available. This helps participating issuers retain cardholders by maintaining continuity of their payment relationships with participating merchants. Shutterstock subscribes to Account Updater, and gets updated copies of your card info when it expires or is replaced. VAU is Visa's version; more info is in a fact sheet here . MasterCard calls their version Account Billing Updater . American Express calls their version..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/242906/how-does-shutterstock-keep-getting-my-latest-debit-card-number"} +{"id": "cybersecurity_106855", "domain": "cybersecurity", "question_title": "How should I set up emergency access to business-critical secrets in case I am "hit by a bus"?", "question_body": "I work as the primary developer and IT administrator for a small business. I want to ensure that business can continue even if I suddenly become unavailable for some reason. Much of what I do requires access to a number of servers, (through key-based ssh), cloud services, and other secure infrastructure of applications. Some of these services use MFA, either using dedicated MFA apps (like Amazon) or SMS. How do I ensure that my \"hit by a bus\" plan and documentation is complete and comprehensive, but that this documentation is not itself a security risk? The documentation will be hosted on a shared file server behind our VPN, but that can also be accessed using a third party web frontend that puts a \"DropBox\"-like interface on top of the base file server (i.e. authentication, desktop syncing, file sharing, etc). The files are in a location where only I, and other file server administrators can see them. How should I manage the \"secrets\" (passwords, private keys, MFA access) in this documentation to ensure it remains comprehensive without compromising security?", "question_score": 145, "question_tags": ["physical", "credentials", "business-risk", "secret-sharing"], "choices": {"A": "Always have your slip with you! This is the golden rule of Red Teaming! If you don't have your Permission to Attack with you, it's like driving without a driver's license. That said, if you are caught during an engagement, I recommend the following: Present a forged Permission to Attack. This way, you can see if criminals could possibly trick a security guard to letting them do their thing with a fake Permission to Attack. Present the real Permission to Attack. If a guard has not bought your fake slip, then it's time to hand in the real slip. If...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "My advice would be to remove the secrets from the drop-box and store them elsewhere. Your instructions have to be easily human readable by anyone, but they can include instructions on how to get access to the properly secured part of the data. That lets you separate the accessibility side of things from the security side. Once you can think about security on its own, you can start to ask the real question of how much do you need to protect these keys? This is a business logic question, so consult your management. You might: Have a password to a...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/106855/how-should-i-set-up-emergency-access-to-business-critical-secrets-in-case-i-am"} +{"id": "cybersecurity_18666", "domain": "cybersecurity", "question_title": "Is there any technical security reason not to buy the cheapest SSL certificate you can find?", "question_body": "While shopping for a basic SSL cert for my blog, I found that many of the more well-known Certificate Authorities have an entry-level certificate (with less stringent validation of the purchaser's identity) for approximately $120 and up. But then I found that Network Solutions offers one of these lower-end certs for $29.99 (12 hours ago it was $12.95) with a 4-year contract. Is there any technical security reason that I should be aware of that could make me regret buying the lowest-end certificate? They all promise things like 99% browser recognition, etc. I'm not asking this question on SE for comparison of things like the CA's quality of support (or lack thereof) or anything like that. I want to know if there is any cryptographic or PKI reason so avoid a cert which costs so little. It, like others, says that it offers \"up to 256 bit encryption\".", "question_score": 144, "question_tags": ["encryption", "tls", "certificates", "certificate-authority", "trust"], "choices": {"A": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "D": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/18666/is-there-any-technical-security-reason-not-to-buy-the-cheapest-ssl-certificate-y"} +{"id": "cybersecurity_128581", "domain": "cybersecurity", "question_title": "Hosting company advised us to avoid PHP for security reasons. Are they right?", "question_body": "I'm doing a redesign for a client who's understandably concerned about security after having been hacked in the past. I had initially suggested using a simple PHP include for header and footer templates and a contact form they wanted. They are reluctant because they were advised by their hosting company that using PHP is a security concern which might allow someone to break into cPanel and gain control of the site. This, to me, sounds about like telling someone to never drive so they won't be in a car accident. My gut instinct is that the host is trying to shift blame onto the client for security flaws in their own system. Also, the server still has PHP installed, whether or not we use it, so I'm questioning how much this actually reduces the attack surface... But since I'm not a security expert, I don't want to stick my foot in my mouth. I told my client that to process the contact form they're going to need some form of dynamic scripting. (False?) They asked if I could just use PHP on that one page. Would this be measurably safer, or is it the equivalent of locking your car doors and leaving the window rolled down? How much truth is there to the claim that using any PHP script, no matter how simple, is an inherent security problem? We're on shared hosting with no SSL. Is it reasonable to assume we got hacked due to using PHP? Will we be any safer if we don't use it, but can't uninstall it? Because if not, we have other problems. (Would the answer be different for any other language?)", "question_score": 143, "question_tags": ["php", "shared-hosting"], "choices": {"A": "It's not so much that PHP itself has security problems (assuming needed security updates), as it is there exists a lot of popular PHP-based software with rampant security problems. You could fault PHP for being a language that gives you enough rope to choke yourself, but the real problem is just how prevalent vulnerable PHP code actually is. One need look no further than the Stack Overflow PHP tag to find PHP newbies writing horrifically vulnerable code based on some atrocity of an old tutorial. Additionally, a significant number of popular PHP software known for their rampant security flaws is...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/128581/hosting-company-advised-us-to-avoid-php-for-security-reasons-are-they-right"} +{"id": "cybersecurity_174850", "domain": "cybersecurity", "question_title": "Is public Wi-Fi a threat nowadays?", "question_body": "In my opinion, arguments we have been using for years to say that public Wi-Fi access points are insecure are no longer valid, and so are the recommended remedies (e.g. use VPN). Nowadays, most sites use HTTPS and set HSTS headers, so the odds that someone can eavesdrop someone else's connection is very low, to the point of expecting a zero-day vulnerability in TLS. So, what other threats may someone face nowadays on a public network?", "question_score": 143, "question_tags": ["wifi", "threat-mitigation", "threat-modeling"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "Public WiFi is still insecure, and it will always be if not used together with something like a VPN. Many websites use HTTPS, but not nearly all. In fact, more than 30 percent don't . Only around 5 percent of websites use HSTS. And it's still trust on first use. If the max age is short, that first use can be quite often. Let's face it, even if you are a security pro chances are that you would fall for SSL strip anyway. I know I would. Just because you use HTTPS doesn't mean you do it right. There's still...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/174850/is-public-wi-fi-a-threat-nowadays"} +{"id": "cybersecurity_170481", "domain": "cybersecurity", "question_title": "How secure is Chrome storing a password?", "question_body": "Whenever I enter a login into a new site, Chrome asks me if it should store the login details. I used to believe this was fairly secure. If someone found my computer unlocked, they could get past the login screen for some website using the stored details, but if asked for the password again like during checkout, or if they wanted to login to the service from another device, they would be out of luck. At least, that's what I used to think when I believed the browser did not store the password itself, but a hash or encryption of the password. I have noticed that the browser fills the username and password fields, and the password field indicates the number of characters in the password. I'm one of those people who when asked to change their password just keeps the same password, but changes a number at the end. I know this is bad, but with how often I am asked to change passwords, I really could not remember the number of passwords expected of me. This results in a lot of passwords that are the same, but sometimes I forget what the end number needs to be for a particular login. I could not remember the ending number for a certain login, so I went to a website where the password was stored. I deleted the last couple of characters and tried different numbers and viola, knew what was the right ending number. It seems to me that this is a fundamental security flaw. If I can check the last character of my password without checking any others, then the amount of tries it takes to crack the password grows linearly with the number of characters not exponentially. It seems like a short stride from there to say that if someone came to my computer when it was unlocked, a simple script could extract all of the stored passwords for all of the major websites which I have passwords stored for. Is this not the case? Is there some other layer of security that would prevent this?", "question_score": 142, "question_tags": ["encryption", "passwords", "chrome"], "choices": {"A": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "B": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing...", "C": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/170481/how-secure-is-chrome-storing-a-password"} +{"id": "cybersecurity_184099", "domain": "cybersecurity", "question_title": "Secure way of masking out sensitive information in screenshots?", "question_body": "As a guy working in security/pentest, I regularly take screenshots of exposed passwords/sensitive information. Whenever I report these, I mask parts or complete info as in the sample given below I often wonder, is it possible for someone to 'reverse engineer' these pics and recover the original information? If so, what should be the correct way of masking such kind of info? I am using shutter for taking screenshots and using accompanied edit tool to add the black stroke. EDIT: As pointed out by some of you, my question is different from this since: I am not asking about MS paint/black strokes. The image is just an example to better explain the question I have clearly asked for the correct/most secure way of producing photographic evidence.", "question_score": 142, "question_tags": ["forensics", "image"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "C": "Yes, it can be recovered. As long as shutter does not use layer (it almost certainly does not) and as long as the black is really all black (it must not be transparent), it is enough. The picture that you provided uses some amount of transparency, see here: All I had to do is use the Fill tool in MS Paint. If I used some algorithm that would take the jpg compression into account, I could probably get better results. Solution: Use an editor that does not make the block transparent. Make sure layers are not used. Make sure change...", "D": "As mentioned in the answers to a very similar question , scribbling over part of an image will destroy the original pixels, assuming that your editor doesn't store any layers or undo history in the saved image. (Paint doesn't.) There are some things to watch out for, though: The width of the blanked region places an upper bound on the length of the secret data The height of the region could tell attackers whether the text representation of the data has ascenders or descenders (like in the letters b and p ) Any spaces in the blanked region provide information..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/184099/secure-way-of-masking-out-sensitive-information-in-screenshots"} +{"id": "cybersecurity_11493", "domain": "cybersecurity", "question_title": "How hard is it to intercept SMS (two-factor authentication)?", "question_body": "A lot of two-factor authentication mechanisms use SMS to deliver single-use passphrase to the user. So how secure is it? Is it hard to intercept the SMS message containing the passphrase? Do mobile networks use any kind of encryption on SMS? I found an interesting article regarding two-factor authentication and the ways it could be attacked.", "question_score": 141, "question_tags": ["authentication", "mobile", "multi-factor", "phone", "sms"], "choices": {"A": "GSM includes some protection through cryptography. The mobile phone and the provider (i.e. the base station which is part of the provider's network) authenticate each other relatively to a shared secret, which is known to the provider and stored in the user's SIM card. Some algorithms known under the code names \"A3\" and \"A8\" are involved in the authentication. Then the data (as sent through the radio link) is encrypted with an algorithm called \"A5\" and a key derived from A3/A8 and the shared secret. There are several actual algorithms which hide under the name \"A5\". Which algorithm is used...", "B": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "C": "This is an exact description of the panic feature built into phones as Peter Harmann already said. Anecdotally I can tell you on my previous Samsung smartphone, I could trigger this exact feature by pressing the power button 3 times in a quick succession. My phone would then take a couple pictures record a short clip of audio and then text those along with my current gps location to a list of contacts I had set up previously. This could actually be incredibly useful as a panic feature to get help when you are in so much danger that you...", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/11493/how-hard-is-it-to-intercept-sms-two-factor-authentication"} +{"id": "cybersecurity_219872", "domain": "cybersecurity", "question_title": "Is exploit-free software possible?", "question_body": "I have heard that there will always be vulnerabilities in codes, software. However, I don't understand why it is not possible to have an exploit-free software. If companies keep updating their software, eventually there will be no vulnerabilities, right?", "question_score": 141, "question_tags": ["vulnerability", "theory"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "C": "Software is too complex This is by far the most important factor. Even if you just look at something like a web application, the amount of work hours put into the codebase is immense. The code works with technologies, who's standards are pages over pages long, written decades ago, and which offers features that most developers have never even heard of. Combine that with the fact that modern software is built on libraries, which are built on libraries, which abstract away some low-level library based on some OS functionality, which again is just a wrapper for some other OS function...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/219872/is-exploit-free-software-possible"} +{"id": "cybersecurity_181328", "domain": "cybersecurity", "question_title": "Did I just get DNS Hijacked?", "question_body": "I went online on my Macbook today and noticed my iTunes complaining that it couldn't connect to Apple, I tried logging out and in of my account but weirdly it said it couldn't log in; I didn't think much of it at first as I thought maybe it was iTunes just being more buggy than usual. However then I noticed something really weird, when I tried to visit www.apple.com my browser warned me (Google Chrome) saying this website was not secure. This started ringing alarm bells in my mind, I clicked \"Continue Anyway\" and was greeted with this page: Being (somewhat of) a web designer/developer I pay attention to the little details on a website and I knew instantly this was not what the Apple homepage looks like, and they certainly didn't prompt you to login on their homepage. I dug in a little deeper to the source code for the page and could see that the source code was way too simplified for a large corporation; the only piece of JS was to verify that the email address was in the right format. I began to suspect maybe my Mac machine had been infected, so I switched to my iPhone (on the same WiFi network), tried www.apple.com , and got shown the exact same page. To me this sounded like something to do with DNS as the chances that both my devices were infected were very unlikely. I then turned to my router to have a look at its settings. Lo and behold, when digging into the DNS settings I could see that the settings looked a little odd. I had initially set my DNS settings to use Google's servers, although this was set many years ago I knew the were something along the lines of 8.8.*.* . In my settings however I found the following IP's: Primary: 185.183.96.174 Secondary: 8.8.8.8 I knew straight away that the DNS had been changed, the primary address should have been 8.8.4.4 . No one has access to my router administration page aside from me on the network, and I have disabled access to the router outside of the local network I can see outside access was enabled, on initial setup this was definitely switched off. My question is: \"How could the DNS have been changed/What can I do to prevent this from happening again? I try to keep my router firmware up to date (although I was maybe 1 release behind at the time of this post). More about the phishing site: Before I changed the Primary DNS setting back and I wanted to find out more about this phishing site, so I ran ping apple.com to find the IP address was 185.82.200.152 . When I entered this into a browser I could see that the person had created a number of sites to try and capture logins. I suspect they're based in the US; I don't believe Walmart operates outside of the states (at least not in the UK). I have reported the IP to the Dubai based web host and am waiting for a response. Edit (Router details): Asus AC87U, FW Version 3.0.0.4.380.7743 (1 release behind) I did not have the default passwords set. Second update: Host has suspended the account.", "question_score": 140, "question_tags": ["dns", "router"], "choices": {"A": "Yes, your router's primary DNS entry was pointed to a rogue DNS server to make devices in your network resolve apple.com and other domains to phishing sites instead. The router possibly got compromised through an unpatched vulnerability in its firmware. I have an Asus AC87U, FW Version 3.0.0.4.380.7743 (1 release behind). Your release is over half a year old. The latest release 3.0.0.4.382.50010 (2018-01-25) comes with lots of security fixes, including RCE vulnerabilities which may have been exploited here. Security fixed Fixed KRACK vulnerability Fixed CVE-2017-14491: DNS - 2 byte heap based overflow Fixed CVE-2017-14492: DHCP - heap based overflow...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/181328/did-i-just-get-dns-hijacked"} +{"id": "cybersecurity_122336", "domain": "cybersecurity", "question_title": "I got an email threatening to DDOS me if I don't pay a ransom. What should I do?", "question_body": "I received the following email, addressed to me at an email address on my personal domain (for which I run my own mail server on a VPS): FORWARD THIS MAIL TO WHOEVER IS IMPORTANT IN YOUR COMPANY AND CAN MAKE DECISION! We are Armada Collective. lmgtfy URL here Your network will be DDoS-ed starting 12:00 UTC on 08 May 2016 if you don't pay protection fee - 10 Bitcoins @ some-bitcoin-address If you don't pay by 12:00 UTC on 08 May 2016, attack will start, yours service going down permanently price to stop will increase to 20 BTC and will go up 10 BTC for every day of attack. This is not a joke. Our attacks are extremely powerful - sometimes over 1 Tbps per second. And we pass CloudFlare and others remote protections! So, no cheap protection will help. Prevent it all with just 10 BTC @ some-bitcoin-address Do not reply, we will not read. Pay and we will know its you. AND YOU WILL NEVER AGAIN HEAR FROM US! Bitcoin is anonymous, nobody will ever know you cooperated. Obviously, I'm not going to pay the ransom. Should I do anything else? Update: I forwarded the email and original headers to the originating ISP. They replied that \"Measures have been taken.\" So, umm, yay? I guess?", "question_score": 139, "question_tags": ["ddos", "threat-mitigation"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Based on the following article you may simply want to ignore it. This seems to be a common scam and your e-mail looks almost exactly like the one from the following article. http://arstechnica.com/security/2016/04/businesses-pay-100000-to-ddos-extortionists-who-never-ddos-anyone/ Look up the source ISP of the service provider that sent the e-mail and contact their abuse team abuse@company.com . They may disable the source of the e-mails or alert the unsuspecting customer that may own the machine. Notifying the source ISP is helpful to reduce the amount of this. Make sure you send them an e-mail with full headers. If the source appears to be a..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/122336/i-got-an-email-threatening-to-ddos-me-if-i-dont-pay-a-ransom-what-should-i-do"} +{"id": "cybersecurity_136227", "domain": "cybersecurity", "question_title": "What is 'tabnabbing'?", "question_body": "Wikipedia is not very explicit on this, The exploit employs scripts to rewrite a page of average interest with an impersonation of a well-known website, when left unattended for some time. What is 'tabnabbing', how does one do it?", "question_score": 139, "question_tags": ["web-browser", "exploit"], "choices": {"A": "Tabnabbing is a phishing technique where a malicious web site changes its looks while the tab is inactive in order to trick the user into entering credentials. This page is simultaneously a description and a demo. When you visit it, it shows a description of what tabnabbing is. When you then click another tab, it changes the tabs favicon and title to look like Gmail. Later, when the user wants to read her mail she goes to this tab thinking it is Gmail and enters her credentials. Edit: In this animation, you see that while I am reading SE, the...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "D": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/136227/what-is-tabnabbing"} +{"id": "cybersecurity_174125", "domain": "cybersecurity", "question_title": "Is it secure to store passwords with 2 way encryption?", "question_body": "I'm a parent who has a parent account with my local school district so that I can log in to their website to view my child's grades etc. I clicked the \"forgot password' button, and my password was emailed to me in plain text. This concerned me, so I emailed the principal, including some links from the bottom of this page . This is the reply I received from the organization's IT department: Parent passwords are not stored in plain text. They are encrypted. Not a 1 way encryption but a 2 way encryption. This is how the system is able to present it back via an email through Ariande's CoolSpool utility. For support reasons, the parent password is visible to certain staff until the parent has successfully signed in 3 times. After that, no staff can see that password. However, it is stored in such a way that the system itself can send it back to the verified email. In the future after a parent's 3 successful sign ins, if they forget their password, their verified email account will be sent a link to reset their password, this change is in the works. Does this explanation justify the plain text password being sent by email, and are my passwords secure with them? If not, what references or resources could I reply to them with?", "question_score": 139, "question_tags": ["encryption", "passwords"], "choices": {"A": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "B": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/174125/is-it-secure-to-store-passwords-with-2-way-encryption"} +{"id": "cybersecurity_65244", "domain": "cybersecurity", "question_title": "What are the security reasons for disallowing the plus sign in email addresses?", "question_body": "My question is based on this tweet after I commented about forbidding + symbols in email addresses. The tweet says, \"This is a measure we've taken for security reasons.\" This can be frustrating and inconvenient for people that have (or use) plus signs in their email address, and I'm sure web sites don't intend to do that. I'm unaware of the security vulnerabilities related to using the + character; is this something I should change to improve my own security? What is the security reason for a web site to disallow that character on an email field? Update: Meetup Support responded positively. Turns out it's more of a UX issue than a security one. They clarified in this tweet that they disallow + to prevent spam (?) and they acknowledged a suggestion for improving the user experience. (My intent here was not to gripe about Meetup; let's be gentle! I wanted to make sure I was not missing something important in my own web sites that receive email addresses.)", "question_score": 137, "question_tags": ["email"], "choices": {"A": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "B": "There is no security vulnerability per se with having a '+' in your email address. It's permitted as per RFC 2822 , and not particularly useful for SQL or other common forms of injection. However, many systems (let's call Meetup a system for this purpose) enforce security through whitelisting, not blacklisting. Someone defined a limited list of characters they expected to see in email addresses (probably upper, lower, numeric, ., _, and -) and wrote a filter to block anything outside that list. And they didn't think anyone would use +, so you're out of luck. This article describes how...", "C": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/65244/what-are-the-security-reasons-for-disallowing-the-plus-sign-in-email-addresses"} +{"id": "cybersecurity_115507", "domain": "cybersecurity", "question_title": "Why are programs written in C and C++ so frequently vulnerable to overflow attacks?", "question_body": "When I look at the exploits from the past few years related to implementations, I see that quite a lot of them are from C or C++, and a lot of them are overflow attacks. Heartbleed was a buffer overflow in OpenSSL; Recently, a bug in glibc was found that allowed buffer overflows during DNS resolving; that's just the ones I can think off right now, but I doubt that these were the only ones that A) are for software written in C or C++ and B) are based on a buffer overflow. Especially concerning the glibc bug, I read a comment that states that if this happened in JavaScript instead of in C, there wouldn't have been an issue. Even if the code was just compiled to Javascript, it wouldn't have been an issue. Why are C and C++ so vulnerable to overflow attacks?", "question_score": 137, "question_tags": ["buffer-overflow", "c", "c++"], "choices": {"A": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "D": "C and C++, contrary to most other languages, traditionally do not check for overflows. If the source code says to put 120 bytes in an 85-byte buffer, the CPU will happily do so. This is related to the fact that while C and C++ have a notion of array , this notion is compile-time only. At execution time, there are only pointers, so there is no runtime method to check for an array access with regards to the conceptual length of that array. By contrast, most other languages have a notion of array that survives at runtime, so that all..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/115507/why-are-programs-written-in-c-and-c-so-frequently-vulnerable-to-overflow-attac"} +{"id": "cybersecurity_118975", "domain": "cybersecurity", "question_title": "Is it safe to include an API key in a request's URL?", "question_body": "Lately I've seen plenty of APIs designed like this: curl \"https://api.somewebsite.com/v1/something&key=YOUR-API-KEY\" Isn't it elementary that passing an API key in a query string as a part of the URL is not secure at least in HTTP.", "question_score": 137, "question_tags": ["tls", "http", "url"], "choices": {"A": "This is commonly known as a capability URL / secret URL. It's secure in modern websites but not suitable for all applications and requires significant care to use . You can find an excellent overview of their advantages, risks and best practices in this page by W3C . It's meaningless to talk about security without specifying a threat model. Here are a couple that come to mind: 1: A passive attacker on the network (eavesdroping) 2: An active attacker on the network (can change packets at will, mitm, etc) 3: A shoulder-surfer 4: An attacker with physical access to your...", "B": "It seems to me the question is \"do you trust your own datacenter\". In other words, it seems like you're trying to finely draw the line where the untrusted networks lie, and the trust begins. In my opinion, SSL/TLS trust should terminate at the SSL offloading device since the department that manages that device often also manages the networking and infrastructure. There is a certain amount of contractual trust there. There is no point of encrypting data at a downstream server since the same people who are supporting the network usually have access to this as well. (with the possible...", "C": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "D": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/118975/is-it-safe-to-include-an-api-key-in-a-requests-url"} +{"id": "cybersecurity_121100", "domain": "cybersecurity", "question_title": "Can a computer virus be stored somewhere else than on the hard drive?", "question_body": "Are there viruses that have managed to hide themselves somewhere other than on the hard drive? Like CPU cache or on the motherboard? Is it even possible? Say I get a virus, so I get rid of the HDD and install a new one. Could the virus still be on my PC?", "question_score": 137, "question_tags": ["virus"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "Plenty of places: BIOS / UEFI - BlackHat presentation (PDF) System Management Mode (SMM) or the Intel Management Engine (IME) - Phrack article . GPUs - Proof of concept rootkit on GitHub . Network cards - Recon 2011 presentation (PDF) A Quest To The Core (PDF) - a good presentation covering everything from BIOS to SMM to microcode. Modern hardware has a wide range of persistent data stores, usually used for firmware. It's far too expensive to ship a complex device like a GPU or network card and put the firmware on a mask ROM where it can't be updated,...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/121100/can-a-computer-virus-be-stored-somewhere-else-than-on-the-hard-drive"} +{"id": "cybersecurity_184391", "domain": "cybersecurity", "question_title": "Received a set of SMS/MMS containing 2 photos, a voice message, and a text "I need help" with Google Maps link from a known contact. Is it spam?", "question_body": "My girlfriend (let's call her Jane) just got a set of SMS or MMS messages coming from a friend of her (let's call her Hellen). These messages contain: Two photos of Hellen A voice message A text that says \"I need help\" followed by a Google Maps link. And according to the messaging application, they where sent to 5 people, including Jane. With all this being extremely suspicious, I told Jane not to touch anything on that messages and asked Hellen a bunch of questions: The phone is a Samsung Galaxy J5 Android version is 7.1.1 Hellen did not take those pictures of herself, and the pictures do look accidental, like if the phone took the photos while she was just holding it doing another thing. Hellen doesn't remember any recent apps installed or unusual web activity (I don't fully trust her on this one but whatever). With the case exposed, I ask you: I am right assuming this is only Hellen's problem and as long as Jane ignored and deleted her messages she is safe? How should we proceed about Hellen's phone? A simple factory reset would do it? How can we prevent this situation in the future?", "question_score": 137, "question_tags": ["spam", "sms"], "choices": {"A": "They're probing your site. First, whether the comment will be published. Second, note how they use several popular syntaxes for links - it's an attempt to check which of them will result in an actual HTML link. If your site lets those posts through, expect more spam, this time more malicious.", "B": "This is an exact description of the panic feature built into phones as Peter Harmann already said. Anecdotally I can tell you on my previous Samsung smartphone, I could trigger this exact feature by pressing the power button 3 times in a quick succession. My phone would then take a couple pictures record a short clip of audio and then text those along with my current gps location to a list of contacts I had set up previously. This could actually be incredibly useful as a panic feature to get help when you are in so much danger that you...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/184391/received-a-set-of-sms-mms-containing-2-photos-a-voice-message-and-a-text-i-ne"} +{"id": "cybersecurity_120443", "domain": "cybersecurity", "question_title": "Internet courtship: Why would a hacker buy me poker chips?", "question_body": "Believe me, I never expected to ever write a title like that on a Stack Exchange site either! Yesterday evening I got a call from my mother. She is quite tech savvy and generally knows her way around spam and viruses. However, yesterday she was startled: she got an email from Facebook thanking her for her purchase of 40 dollars worth of poker chips in the Facebook game TexasHoldEm. She was ultimately sure she had never done a purchase like that, but she was worried she had lost money one way or another. The email seemed genuine. Logo, text, sender, and links all pointed to genuine Facebook resources. I decided to take a look and followed the link to the 'receipt'. A payment overview at Facebook.com opened and everything was documented as the email had stated: her account had acquired 40 dollars worth of poker chips in the app (game) TexasHoldEm. Surprisingly, though, those chips were paid with a PayPal-account registered to an email address we have never heard of: givenName.LastNameNumber@web.de This is odd for two reasons: we live in Belgium, but have no relation, friends, family or otherwise, in Germany. Second we know no one by that name either. At first I thought it may have been an error on that person's side, or that it is simply possible to 'donate' chips to someone else's Facebook account. But this would allow app developers to spam people who had never used their app with free gifts, so this seemed unlikely. I then checked her account's recent activity, more specifically the 'recent sessions' tab. To my surprise there was indeed an active session in Düsseldorf, Germany. As a panic attack, I immediately ended that session. Unfortunately that also hid the information about that session. For me this meant only one thing: her account must have been hacked, as she hasn't been to Germany and there is no way there could be an active - poker-playing - Facebook instance there. In light of this, I urged her to immediately change her password. After that, Facebook seems smart enough to know you made the change because you thought something was wrong: it proposed to go through her recent app activity and post and possibly deleting strange behaviour. Indeed, the app TexasHoldEm had been used, and there had been four posts (of the app on her behalf) that she had been playing the game - going back one whole week. As a conclusion I would think that someone hacked my mother's account, played poker on it and paid for chips him/herself and ... That's it. Maybe I am getting old, but isn't this weird behaviour? Why would a hacker do this: hack some one's account, buy poker chips with their own PayPal account, and play the game? And how can I better protect myself against such 'attacks'? The poker chips were for Zynga's Poker game on Facebook. As has been mentioned in the comments , you cannot withdraw won money from this game. This is valuable - and intriguing - information which makes understanding the hacker's motives even harder.", "question_score": 136, "question_tags": ["passwords", "facebook", "identity-theft"], "choices": {"A": "I interpret your question as: What's the motivation for someone to use an alien Facebook account to play poker and stock it with chips? It's not that strange if you think about it this way: As poker is a game where knowledge about the dealt cards gives you a significant edge in the game, you'd like to use sock puppets at a table to know more about the card distribution. Thus, using sock puppets that are valid, active - real - Facebook accounts are the only way to gather more information without being spotted easily by heuristics. Düsseldorf is where...", "B": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess.", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/120443/internet-courtship-why-would-a-hacker-buy-me-poker-chips"} +{"id": "cybersecurity_170388", "domain": "cybersecurity", "question_title": "Do I need CSRF token if I'm using Bearer JWT?", "question_body": "Context : Angular site is hosted on S3 behind CloudFront, separate from Express server that is used as API and almost all requests are XMLHttpRequests. All requests are sent without cookies (withCredentials = false by default) and I use JWT Bearer token for authentication by taking it from cookies in angular and placing to Authorization header (This technique is kind of what is described in CSRF Wiki page ). On Express site I do not allow Cookie header in Access-Control-Allow-Headers . Cookies have secure: true flag, and are NOT httpOnly because I need to manually access them in angular. Also I've read in this Medium article that JSON-Web-Tokens(JWT )/Bearer Tokens is without a doubt one of the best methods of preventing CSRF Question 1 : Will I add extra security if I'll add X-XSRF-Token header to each request and for example make the mechanism stateless by checking for that same value in JWT payload? (I'we read about it in this thread ) Question 2 : Do I actually need extra security efforts agains CSRF taking all that I described?", "question_score": 136, "question_tags": ["cookies", "csrf", "node.js", "angularjs"], "choices": {"A": "This is relevant but doesn't necessarily answer 100% of your question: https://security.stackexchange.com/a/166798/149676 The short of it is that as long as authentication isn't automatic (typically provided by the browser) then you don't have to worry about CSRF protection. If your application is attaching the credentials via an Authorization header then the browser can't automatically authenticate the requests, and CSRF isn't possible. Therefore, I would re-word the quote from your article slightly: it isn't that Bearer Tokens are the best defense against CSRF attacks, but simply that CSRF is an attack vector that specifically attacks requests where the browser automatically provides...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/170388/do-i-need-csrf-token-if-im-using-bearer-jwt"} +{"id": "cybersecurity_30403", "domain": "cybersecurity", "question_title": "Should SSL be terminated at a load balancer?", "question_body": "When hosting a cluster of web application servers it’s common to have a reverse proxy (HAProxy, Nginx, F5, etc.) in between the cluster and the public internet to load balance traffic among app servers. In order to perform deep packet inspection, SSL must be terminated at the load balancer (or earlier), but traffic between the load balancer and the app servers would be unencrypted. Wouldn't early termination of SSL leave the app servers vulnerable to packet sniffing or ARP poisoning? Should SSL be offloaded? If so, how can it be done without compromising the integrity of the data being served? My main concern is for a web application where message layer encryption isn't an option.", "question_score": 135, "question_tags": ["tls", "network", "firewalls"], "choices": {"A": "OpenSSL s_client To check if you have disabled the SSLv3 support, then run the following openssl s_client -connect example.com:443 -ssl3 which should produce something like 3073927320:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1258:SSL alert number 40 3073927320:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:596: meaning SSLv3 is disabled on the server. Otherwise the connection will established successfully. Nmap Alternatively, you can use nmap to scan server for supported version: # nmap --script ssl-enum-ciphers example.com Starting Nmap 6.47 ( http://nmap.org ) at 2014-10-15 03:19 PDT Nmap scan report for example.com (203.0.113.100) Host is up (0.090s latency). rDNS record for 203.0.113.100: edge.example.com Not shown: 997 filtered ports PORT STATE...", "B": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "C": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "D": "It seems to me the question is \"do you trust your own datacenter\". In other words, it seems like you're trying to finely draw the line where the untrusted networks lie, and the trust begins. In my opinion, SSL/TLS trust should terminate at the SSL offloading device since the department that manages that device often also manages the networking and infrastructure. There is a certain amount of contractual trust there. There is no point of encrypting data at a downstream server since the same people who are supporting the network usually have access to this as well. (with the possible..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/30403/should-ssl-be-terminated-at-a-load-balancer"} +{"id": "cybersecurity_171055", "domain": "cybersecurity", "question_title": "How did Google know I looked something up?", "question_body": "Yesterday I was searching DuckDuckGo for booking a vacation. I ended up reading a lot on one specific website. Today multiple websites show me Google banners from this specific website. Normally, I never look up websites for booking a vacation. I use DuckDuckGo on purpose, to prevent these kind of things. My question therefore is: how is this possible? I'm 100% certain that I didn't accidentally Google something. The website I was reading was this , if that helps.", "question_score": 135, "question_tags": ["privacy", "google"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "Loading that page loads https://www.googleadservices.com/pagead/conversion.js https://www.googletagmanager.com/gtm.js?id=GTM-WPPRGM https://stats.g.doubleclick.net/dc.js The reason Google can track you is that the website shares details of your visit with them - in this case via loading Google JavaScript code for their ads service. *To expand on this - The Google ad code will use a cookie to track you. But even if it didn't there are browser fingerprinting mechanisms which in most cases can correctly identify a user's machine even after a full browser cache / history clear. When you visit a site with ads a request is made to the ad providers server. This sends...", "C": "A private key corresponds to a single \"identity\" for a given user, whatever that means to you. If, to you, an \"identity\" is a single person, or a single person on a single machine, or perhaps a single instance of an application running on a single machine. The level of granularity is up to you. As far as security is concerned, you don't compromise your key in any way [1] by using it to log in on a machine (as you would by using a password), so having separate keys for separate destinations doesn't make you any more safe from...", "D": "If the device left your sight for any amount of time, replace it. It can no longer be trusted. The cost to assure it can still be trusted significantly exceeds the cost of getting a new one There is effectively no way to verify that the hardware has not been tampered with without significant expertise and employing non-trivial resources. The only solution is to replace the laptop and all associated components. Without knowing your country or other aspects of the situation you are in, there is no way for me to comment on the likelihood of this, only on the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/171055/how-did-google-know-i-looked-something-up"} +{"id": "cybersecurity_189632", "domain": "cybersecurity", "question_title": "Is it common to allow local desktop and/or active directory admin access and rights for developers in organizations?", "question_body": "I work at a company with a staff of about 1000+. We currently have programming development staff that work on web based projects (approx 50 people). Recently due to security concerns our IT and Security department implemented a restriction no longer allowing local admin access on machines . The entire company runs Windows OS for both workstations and servers. I completely agreed with the decision to remove admin, honestly I thought it was long overdue (as the company deals with patient data and requires HIPAA compliance). Unfortunately I believe they took the decision too far. I assumed a subgroup or AD group would be created for users that legitimately needed admin access to do their job (EX my programming team) something like a Tech group that would retain admin access. However this was not the case, the only group created a specific Admin group for Network and Help Desk staff. The main problem is, as web developers we run programs that require local admin access and unfortunately can't do our job without them running as admin. Example programs include Visual Studio for ASP.NET web development, MAMP for local development, composer, etc. I believe the main reason these programs need admin access is because they need to run and modify local IIS, command line, etc. Basically there was short notice of when the local admin access was removed. After about 2 days of the development team being dead in the water in terms of being able to work and me and other team leaders basically yelling and screaming at the IT staff to come up with a solution they finally conceded and found a third party program that works as a pass through allowing the administrators to create the ability for certain programs to run as admin even though we don't have local admin access. Unfortunately, this program we use for local admin access is incredibly buggy and unreliable and not from a reputable source and there doesn't seem to be much for alternatives out there. (I would prefer not to disclose the program we use.) My question is, is it typical to not allow Programmers/Developers local admin access at a company or corporation? And if it is common practice to do so, then how do developers run the programs they need as local admin? A little more information on our network environment (not that it really relates to the question I just thought I'd add this): We use AppBlocker to block programs not on an approved list We use an email security blocker that does things like scan and convert attachments to PDF, etc. We have at least 2 major antivirus programs on all workstations. The network and it's servers very segregated, users only have access to certain servers, folders, and databases that they legitimately need access to.", "question_score": 135, "question_tags": ["windows", "audit", "compliance", "programming", "windows-server"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "Here's one data point from a software company that has an interest in security. I know this is common in similar organisations. There is a number of networks. They are physically separated and airgapped, run different colour-coded network cables. Each employee has an 'administration' machine, which can connect to the Internet (via a proxy) for doing email etc. All users are strictly locked down, and there's strict device and access control. In addition to this, each developer has an 'engineering' machine. This has full admin access, and the user can do whatever they like. However it is connected only to..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/189632/is-it-common-to-allow-local-desktop-and-or-active-directory-admin-access-and-rig"} +{"id": "cybersecurity_12664", "domain": "cybersecurity", "question_title": "Why would someone trust DuckDuckGo or other providers with a similar privacy policy?", "question_body": "DuckDuckGo is a search engine that claims it will not share your results with others. Many of my skeptical coworkers think it may be a scam. Is there any proof that any web search engine will protect your privacy as it advertises?", "question_score": 134, "question_tags": ["privacy", "trust", "duckduckgo"], "choices": {"A": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "B": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "C": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "D": "There is no proof that DuckDuckGo operates as advertised. (There never is, on the web.) However, that is the wrong question. DuckDuckGo is very clear in its privacy policy . DuckDuckGo says it doesn't track you , it doesn't send your searches to other sites , by default it does not use any cookies , it does not collect personal information , it does not log your IP address or other information about your computer that may be sent automatically with your searches , it doesn't store any personal information at all . Those are pretty strong promises, with no..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/12664/why-would-someone-trust-duckduckgo-or-other-providers-with-a-similar-privacy-pol"} +{"id": "cybersecurity_35471", "domain": "cybersecurity", "question_title": "Is there any particular reason to use Diffie-Hellman over RSA for key exchange?", "question_body": "I often see RSA being recommended as a method of key exchange. However, the Diffie-Hellman key exchange method appears to be secure as well. Is there any considerations one should take into account that would lead to using one algorithm over the other?", "question_score": 134, "question_tags": ["key-exchange", "rsa", "diffie-hellman"], "choices": {"A": "The situation can be confused, so let's set things right. RSA is two algorithms, one for asymmetric encryption, and one for digital signatures . These are two distinct beast; although they share the same core mathematical operation and format for keys, they do different things in different ways. Diffie-Hellman is a key exchange algorithm, which is yet another kind of algorithm. Since the algorithms don't do the same thing, you could prefer one over the other depending on the usage context. Asymmetric encryption and key exchange are somewhat equivalent: with asymmetric encryption, you can do a key exchange by virtue...", "B": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/35471/is-there-any-particular-reason-to-use-diffie-hellman-over-rsa-for-key-exchange"} +{"id": "cybersecurity_71316", "domain": "cybersecurity", "question_title": "How secure are the FIDO U2F tokens", "question_body": "Google and Yubico just announced the availability of cryptographic security tokens following the FIDO U2F specification. Is this just another 2FA option, or is this significantly better than solutions such as SecureID and TOTP? Specifically: In what way is U2F fundamentally different from OTP? How does U2F affect the feasibility of phishing attacks in comparison to OTP systems? How feasible are non-interactive attacks against U2F (e.g. brute-force, etc)? Can I safely use a single U2F token with multiple independent services? How does U2F stack up against other commercial offerings? Are there better solutions available?", "question_score": 134, "question_tags": ["authentication", "multi-factor", "one-time-password", "fido"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "The answers I've gotten have been good, but I wanted to provide a bit more depth, going specifically in to why the system exists at all, which should explain a bit more about what it's good for. Disclaimer: While I now work for Google, I knew nothing about this project at the time this answer was written. Everything reported here was gathered from public sources. This post is my own opinions and observations and commentary, and does not represent the opinions, views, or intentions of Google. Though it's worth pointing out that I've been using this and tinkering with it...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/71316/how-secure-are-the-fido-u2f-tokens"} +{"id": "cybersecurity_22711", "domain": "cybersecurity", "question_title": "Is it a bad idea for a firewall to block ICMP?", "question_body": "This question was inspired by this answer which states in part: The generic firewall manifest file finishes off by dropping everything I didn't otherwise allow (besides ICMP. Don't turn off ICMP). But, is it truly a good practice for a firewall to allow ICMP? What are the security implications, and are there cases where ICMP should be turned off?", "question_score": 133, "question_tags": ["network", "firewalls", "icmp"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "Compared to other IP protocols ICMP is fairly small, but it does serve a large number of disparate functions. At its core ICMP was designed as the debugging, troubleshooting, and error reporting mechanism for IP. This makes it insanely valuable so a lot of thought needs to into shutting it down. It would be a bit like tacking >/dev/null 2>&1 to the end of all your cron entries. Most of the time when I talk to people about blocking ICMP they're really talking about ping and traceroute. This translates into 3 types 0 - Echo Reply (ping response) 8 -...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/22711/is-it-a-bad-idea-for-a-firewall-to-block-icmp"} +{"id": "cybersecurity_228918", "domain": "cybersecurity", "question_title": "Why is "fhepfcelehfcepfffacacacacacacabn" a top DNS query from my devices?", "question_body": "I recently set up NextDNS on my personal devices to further reduce the amount of tracking and ads I'm exposed to. The service comes with built-in analytics that shows a brief overview of your network activity. Most of the top hits are uninteresting, however there's one domain I couldn't figure out: What's the domain fhepfcelehfcepfffacacacacacacabn ? The seemingly random string gives roughly two pages of Google results, but none of them seem to hold any useful information. The log table says the entry is a DNS record of type NIMLOC , but that seems like another dead end inquiry-wise.", "question_score": 133, "question_tags": ["dns", "macos", "dns-domain"], "choices": {"A": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "That domain is an encoded form of the string \"WORKGROUP\". It is using a variant of hex encoding that uses the letters A-P, instead of the numbers 0-9 followed by A-F. $ echo fhepfcelehfcepfffacacacacacacabn | tr a-p 0-9a-f | xxd -r -p | xxd 00000000: 574f 524b 4752 4f55 5020 2020 2020 201d WORKGROUP . This appears to be a NetBIOS name , which is why it's padded with spaces to 15 ASCII characters, and then followed by a different character at the end as a suffix. The hex encoding is described in the NetBIOS-over-TCP/UDP Concepts RFC , called \"first..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/228918/why-is-fhepfcelehfcepfffacacacacacacabn-a-top-dns-query-from-my-devices"} +{"id": "cybersecurity_94783", "domain": "cybersecurity", "question_title": "Why is my internal IP address (private) visible from the Internet?", "question_body": "When visiting some websites like http://www.monip.org or http://ip-api.com , I get the following result: Your current IP Address - IP: 197.158.x.x - Internal IP: 192.168.x.x I understand that I can see my public IP address (197.158.x.x). What I can't figure out is that how come my internal IP address is visible through the Internet ? Those websites do not seem to use a Flash plugin, Java applet or other scripts. My ISP is performing a NAT of my internal IP address in order to access the Internet: 3G Wireless Modem [192.168.x.x] -------- ISP [NAT to 197.158.x.x] ------- Internet So how is it possible for a website to see my internal IP address?", "question_score": 132, "question_tags": ["ip"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "C": "The most likely source of this information is your browser's WebRTC implementation. You can see this in the source code of ip-api.com. From https://github.com/diafygi/webrtc-ips , which also provides a demo of this technique: Firefox and Chrome have implemented WebRTC that allow requests to STUN servers be made that will return the local and public IP addresses for the user. These request results are available to javascript, so you can now obtain a users local and public IP addresses in javascript. It was recently noted that the New York Times was using this technique to help distinguish between real visitors and...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/94783/why-is-my-internal-ip-address-private-visible-from-the-internet"} +{"id": "cybersecurity_187515", "domain": "cybersecurity", "question_title": "Is momentary physical access dangerous?", "question_body": "I’m asking the question with these conditions: The device (computer or mobile phone) is in a running state. “Momentary” refers to a reasonably short period of time, such as 5 to 10 seconds. The system may not be in a “locked” state (e.g. showing a lock screen asking for a password). However, the active session doesn’t have superuser privilege (the usual case for a mobile phone). What can a hacker do to gain further access to the system?", "question_score": 131, "question_tags": ["physical"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "That all depends on the system, the attacker, and the level of preparation they had. If they have unlimited preparation, they could do effectively anything that they could do with an unlimited access window. Even if they do not have in-depth knowledge of the specific system, it would not be difficult to very quickly inject malicious code that allows for subsequent remote access. They could: Connect a PCMCIA or PCIe card and dump memory or inject code. Splice a hardware keylogger in between the keyboard's PS/2 or USB cable. Quickly download and execute malicious code, or modify existing code. Access..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/187515/is-momentary-physical-access-dangerous"} +{"id": "cybersecurity_206186", "domain": "cybersecurity", "question_title": "Is HostGator storing my password in plaintext?", "question_body": "I want to bring this up to HostGator, but want to verify my suspicions before making a big fuss. I asked a customer care representative to help me add an SSL certificate to a site I host with them. When he was done, I received this e-mail with all my login information, and my entire password in plain text (I left the first letter visible as evidence). I set up this password over a year ago, and it was a big surprise to find out they sent it back to me, unprompted, in plaintext: I immediately brought this up to the representative, who repeatedly tried to convince me that it was OK. I decided to drop it after a few minutes, because I think I should bring it up to someone higher up. Before I do so, is it safe to assume that my password is stored in their database as plain text? If so, do you have any suggestions on how to address this issue with the provider?", "question_score": 131, "question_tags": ["passwords", "databases", "web-hosting"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "Yep, that's a big problem, especially if that was your old password (i.e. not a newly assigned one). Technically, the password might be stored under reversible encryption rather than plain text, but that's nearly as bad. The absolute minimum standard should be a salted hash - anything less and anybody with access to the auth database who wants to can use an online rainbow table to get back the plaintext passwords in moments - but single-iteration secure hash algorithm (SHA) functions are still easy to brute force with a GPU (they're designed to be fast; a high-end GPU can compute...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/206186/is-hostgator-storing-my-password-in-plaintext"} +{"id": "cybersecurity_221018", "domain": "cybersecurity", "question_title": "What to do if caught in a physical pentest?", "question_body": "I've seen a lot of people talk about how to pentest and how NOT to get caught during engagements but have a hard time finding \"How to behave when caught during a Red Team engagement\". Red Teams are to simulate adversaries attacking systems. Many actions can't be done (or at least very hard to) with just some computers and Red Teams often have to go on-site and break in (legally). What I've seen so far is people succeeding in not getting caught. However, I haven't seen anyone talk about what to do when caught. It may just be some suspicion or even being chased by security (possibly armed). In cases where a Red Teamer is caught during an engagement, what should he/she do? Say \"I'm a security tester. You've caught me so I'll just leave.\" Run away like a criminal with their stolen data (which sounds fun but dangerous) to be more like an actual criminal attacker Contact the employer to report it and get a \"just continue\" pass Quietly come along for some possible interrogation (I think this would be the safest) Update: I've made another question here which covers the 3rd parties not discussed in this question.", "question_score": 131, "question_tags": ["penetration-test", "physical"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "Always have your slip with you! This is the golden rule of Red Teaming! If you don't have your Permission to Attack with you, it's like driving without a driver's license. That said, if you are caught during an engagement, I recommend the following: Present a forged Permission to Attack. This way, you can see if criminals could possibly trick a security guard to letting them do their thing with a fake Permission to Attack. Present the real Permission to Attack. If a guard has not bought your fake slip, then it's time to hand in the real slip. If...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/221018/what-to-do-if-caught-in-a-physical-pentest"} +{"id": "cybersecurity_18556", "domain": "cybersecurity", "question_title": "How do ASLR and DEP work?", "question_body": "How do Address Space Layout Randomisation (ASLR) and Data Execution Prevention (DEP) work, in terms of preventing vulnerabilities from being exploited? Can they be bypassed?", "question_score": 130, "question_tags": ["exploit", "aslr", "dep", "shellcode"], "choices": {"A": "Address Space Layout Randomisation (ASLR) is a technology used to help prevent shellcode from being successful. It does this by randomly offsetting the location of modules and certain in-memory structures. Data Execution Prevention (DEP) prevents certain memory sectors, e.g. the stack, from being executed. When combined it becomes exceedingly difficult to exploit vulnerabilities in applications using shellcode or return-oriented programming (ROP) techniques. First, let's look at how a normal vulnerability might be exploited. We'll skip all the details, but let's just say we're using a stack buffer overflow vulnerability. We've loaded a big blob of 0x41414141 values into our payload,...", "B": "A very simple example would be a cgi, /var/www/cgi-bin/test.cgi: #!/bin/bash echo \"Content-type: text/plain\" echo echo echo \"Hi\" Then call it with wget to swap out the User Agent string. E.g. this will show the contents of /etc/passwd: wget -U \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" http://10.248.2.15/cgi-bin/test.cgi To break it down: \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" Looks like: () { test } echo \\\"Content-type: text/plain\\\" echo echo /bin/cat /etc/passwd The problem as I understand it is that while it's okay to define a function in an environment variable, bash is not supposed to execute...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "Tabnabbing is a phishing technique where a malicious web site changes its looks while the tab is inactive in order to trick the user into entering credentials. This page is simultaneously a description and a demo. When you visit it, it shows a description of what tabnabbing is. When you then click another tab, it changes the tabs favicon and title to look like Gmail. Later, when the user wants to read her mail she goes to this tab thinking it is Gmail and enters her credentials. Edit: In this animation, you see that while I am reading SE, the..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/18556/how-do-aslr-and-dep-work"} +{"id": "cybersecurity_70733", "domain": "cybersecurity", "question_title": "How do I use "openssl s_client" to test for (absence of) SSLv3 support?", "question_body": "In order to mitigate the \"Poodle\" vulnerability , I'd like to disable SSLv3 support in my (in this case, TLS, rather than HTTPS) server. How can I use openssl s_client to verify that I've done this?", "question_score": 130, "question_tags": ["tls", "openssl"], "choices": {"A": "OpenSSL s_client To check if you have disabled the SSLv3 support, then run the following openssl s_client -connect example.com:443 -ssl3 which should produce something like 3073927320:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1258:SSL alert number 40 3073927320:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:596: meaning SSLv3 is disabled on the server. Otherwise the connection will established successfully. Nmap Alternatively, you can use nmap to scan server for supported version: # nmap --script ssl-enum-ciphers example.com Starting Nmap 6.47 ( http://nmap.org ) at 2014-10-15 03:19 PDT Nmap scan report for example.com (203.0.113.100) Host is up (0.090s latency). rDNS record for 203.0.113.100: edge.example.com Not shown: 997 filtered ports PORT STATE...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req (via this commit ). The commit adds an example to the openssl req man page : Example of giving the most common attributes (subject and extensions) on the command line: openssl req -new -subj \"/C=GB/CN=foo\" \\ -addext \"subjectAltName = DNS:foo.co.uk\" \\ -addext \"certificatePolicies = 1.2.3.4\" \\ -newkey rsa:2048 -keyout key.pem -out req.pem The commit message itself is also helpful to understand what's happening: Add 'openssl req' option to specify extension values on command line The idea is..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/70733/how-do-i-use-openssl-s-client-to-test-for-absence-of-sslv3-support"} +{"id": "cybersecurity_178814", "domain": "cybersecurity", "question_title": "Is a Windows installer that doesn't require admin rights dangerous?", "question_body": "I use Atlassian SourceTree on Windows, and one thing I like about it is that it doesn't require admin privileges to install or update. I happened to mention this to our ISSO (Information System Security Officer), and he was not a fan. He said that not requiring admin was dangerous because (to paraphrase) \"If it's not asking you for approval, you never know what it's going and changing in the background!\" Now, this person has a tendency to be overly-cautious, so I am skeptical of his assessment. I had always thought that if a program doesn't ask for administrator permissions, it's because it doesn't make deep enough changes to need them. To add to that, our work computers are extremely locked down, so I find it hard to believe that all an installer has to do to get by our security features is to not ask for permission. So what's the real situation? Can an installer that can run without administrator privileges really be that dangerous?", "question_score": 130, "question_tags": ["windows", "install"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Installing something without needing admin privileges is no more dangerous than running a no-install program with standard user permissions. This is also less dangerous than installing something WITH admin privileges (or indeed, running anything with admin permissions). Running a random program downloaded off the internet, of course, is potentially dangerous - even if it doesn't require admin. If your ISSO's concern is \"you're running random internet code, and the author of that code makes it easy for you to be lazy about asking me to vet it\", then this is quite valid and factual. (you might debate the cost/benefit, but...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/178814/is-a-windows-installer-that-doesnt-require-admin-rights-dangerous"} +{"id": "cybersecurity_187556", "domain": "cybersecurity", "question_title": "What stops Google from saving all the information on my computer through Google Chrome?", "question_body": "I noticed that in Google Chrome, if I type in file:///C:/Users/MyUsername/Desktop/ it shows me all of the folders on my Desktop, and I can type open up PDFs and such in chrome just by typing in the file path. What processes and systems are in place so that Google is not able to copy data stored on my computer? What processes and systems are in place so that someone who writes a Chrome extension is not able to copy files stored on my computer?", "question_score": 129, "question_tags": ["chrome", "file-system", "file-access"], "choices": {"A": "What processes and systems are in place so that Google is not able to copy the data on my computer? None. Google Chrome usually runs with the permissions of your user account. The application can then read and modify local files to the same extent your user account can. (These permissions apply to most of the programs you're using.) So you need to trust Google in that they don't ship a malicious update that spies on you, or keep sensitive files inaccessible to the account you're running the browser with. Alternatively, there are most likely sandbox implementations for your OS...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/187556/what-stops-google-from-saving-all-the-information-on-my-computer-through-google"} +{"id": "cybersecurity_78621", "domain": "cybersecurity", "question_title": "Which elliptic curve should I use?", "question_body": "I am currently renewing an SSL certificate, and I was considering switching to elliptic curves. Per Bernstein and Lange , I know that some curves should not be used but I'm having difficulties selecting the correct ones in OpenSSL: $ openssl ecparam -list_curves secp112r1 : SECG/WTLS curve over a 112 bit prime field secp112r2 : SECG curve over a 112 bit prime field secp128r1 : SECG curve over a 128 bit prime field secp128r2 : SECG curve over a 128 bit prime field secp160k1 : SECG curve over a 160 bit prime field secp160r1 : SECG curve over a 160 bit prime field secp160r2 : SECG/WTLS curve over a 160 bit prime field secp192k1 : SECG curve over a 192 bit prime field secp224k1 : SECG curve over a 224 bit prime field secp224r1 : NIST/SECG curve over a 224 bit prime field secp256k1 : SECG curve over a 256 bit prime field secp384r1 : NIST/SECG curve over a 384 bit prime field secp521r1 : NIST/SECG curve over a 521 bit prime field prime192v1: NIST/X9.62/SECG curve over a 192 bit prime field prime192v2: X9.62 curve over a 192 bit prime field prime192v3: X9.62 curve over a 192 bit prime field prime239v1: X9.62 curve over a 239 bit prime field prime239v2: X9.62 curve over a 239 bit prime field prime239v3: X9.62 curve over a 239 bit prime field prime256v1: X9.62/SECG curve over a 256 bit prime field sect113r1 : SECG curve over a 113 bit binary field sect113r2 : SECG curve over a 113 bit binary field sect131r1 : SECG/WTLS curve over a 131 bit binary field sect131r2 : SECG curve over a 131 bit binary field sect163k1 : NIST/SECG/WTLS curve over a 163 bit binary field sect163r1 : SECG curve over a 163 bit binary field sect163r2 : NIST/SECG curve over a 163 bit binary field sect193r1 : SECG curve over a 193 bit binary field sect193r2 : SECG curve over a 193 bit binary field sect233k1 : NIST/SECG/WTLS curve over a 233 bit binary field sect233r1 : NIST/SECG/WTLS curve over a 233 bit binary field sect239k1 : SECG curve over a 239 bit binary field sect283k1 : NIST/SECG curve over a 283 bit binary field sect283r1 : NIST/SECG curve over a 283 bit binary field sect409k1 : NIST/SECG curve over a 409 bit binary field sect409r1 : NIST/SECG curve over a 409 bit binary field sect571k1 : NIST/SECG curve over a 571 bit binary field sect571r1 : NIST/SECG curve over a 571 bit binary field c2pnb163v1: X9.62 curve over a 163 bit binary field c2pnb163v2: X9.62 curve over a 163 bit binary field c2pnb163v3: X9.62 curve over a 163 bit binary field c2pnb176v1: X9.62 curve over a 176 bit binary field c2tnb191v1: X9.62 curve over a 191 bit binary field c2tnb191v2: X9.62 curve over a 191 bit binary field c2tnb191v3: X9.62 curve over a 191 bit binary field c2pnb208w1: X9.62 curve over a 208 bit binary field c2tnb239v1: X9.62 curve over a 239 bit binary field c2tnb239v2: X9.62 curve over a 239 bit binary field c2tnb239v3: X9.62 curve over a 239 bit binary field c2pnb272w1: X9.62 curve over a 272 bit binary field c2pnb304w1: X9.62 curve over a 304 bit binary field c2tnb359v1: X9.62 curve over a 359 bit binary field c2pnb368w1: X9.62 curve over a 368 bit binary field c2tnb431r1: X9.62 curve over a 431 bit binary field wap-wsg-idm-ecid-wtls1: WTLS curve over a 113 bit binary field wap-wsg-idm-ecid-wtls3: NIST/SECG/WTLS curve over a 163 bit binary field wap-wsg-idm-ecid-wtls4: SECG curve over a 113 bit binary field wap-wsg-idm-ecid-wtls5: X9.62 curve over a 163 bit binary field wap-wsg-idm-ecid-wtls6: SECG/WTLS curve over a 112 bit prime field wap-wsg-idm-ecid-wtls7: SECG/WTLS curve over a 160 bit prime field wap-wsg-idm-ecid-wtls8: WTLS curve over a 112 bit prime field wap-wsg-idm-ecid-wtls9: WTLS curve over a 160 bit prime field wap-wsg-idm-ecid-wtls10: NIST/SECG/WTLS curve over a 233 bit binary field wap-wsg-idm-ecid-wtls11: NIST/SECG/WTLS curve over a 233 bit binary field wap-wsg-idm-ecid-wtls12: WTLS curvs over a 224 bit prime field Oakley-EC2N-3: IPSec/IKE/Oakley curve #3 over a 155 bit binary field. Not suitable for ECDSA. Questionable extension field! Oakley-EC2N-4: IPSec/IKE/Oakley curve #4 over a 185 bit binary field. Not suitable for ECDSA. Questionable extension field! Could a kind cryptographer point out to me which curves are still considered safe?", "question_score": 128, "question_tags": ["openssl", "ecc"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "What is the Poodle vulnerability ? The \"Poodle\" vulnerability, released on October 14th, 2014 , is an attack on the SSL 3.0 protocol. It is a protocol flaw, not an implementation issue; every implementation of SSL 3.0 suffers from it. Please note that we are talking about the old SSL 3.0, not TLS 1.0 or later. The TLS versions are not affected (neither is DTLS). In a nutshell: when SSL 3.0 uses a block cipher in CBC mode, the encryption process for a record uses padding so that the data length is a multiple of the block size. For instance,...", "C": "This is not a flaw in TLS; it is a simple memory safety bug in OpenSSL. The best explanations I've run across so far are the blog posts Diagnosis of the OpenSSL Heartbleed Bug by Sean Cassidy and Attack of the week: OpenSSL Heartbleed by Matthew Green. In short, Heartbeat allows one endpoint to go \"I'm sending you some data, echo it back to me\". You send both a length figure and the data itself. The length figure can be up to 64 KiB. Unfortunately, if you use the length figure to claim \"I'm sending 64 KiB of data\" (for...", "D": "You are misreading Bernstein and Lange's advice (admittedly, their presentation is a bit misleading, with the scary red \"False\" tags). What they mean is not that some curves are inherently unsafe, but that safe implementation of some curves is easier than for others (e.g. with regards to library behaviour when it encounters something which purports to be the encoding of a valid curve point, but is not). What you really want is a curve such that: the software which you will entrust with your private key (your SSL server) is properly implemented and will not leak details about your private..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/78621/which-elliptic-curve-should-i-use"}