It's well into 2017 - what's the latest best practise password policy

Level's of acceptability are determined based on an organizations or individuals risk appetite. 2FA is not a silver bullet, and as a pen-tester I'm going to pop any box I can (whether it be admin, or not) and then work on escalating privileges. 2FA will not protect you against system vulns that can provide access to SYSTEM or root, so if I have a foothold in your network via a compromised workstation I'm going to start fingerprinting services and try to get domain admin. Compromised end-user workstations also provide potential pivot-points into additional networks (perhaps dev environments where things may not be as secure). If you want to make life harder for threat actors, enable 2FA org wide if possible.
There are a lot of these lists available, but check out This GitHub Repo which contains several lists of the most common passwords utilized. A warning: You will be shocked and dismayed at what the most common passwords that are still being used.
Again, your reasonable minimum length is going to depend on what you're trying to secure. Ultimately as security people we'd love to see massively long passwords with high entropy spread across an organization, however that may not be feasible in many instances. Security is important but should minimally impede an organizations ability to be productive. A LUKS decryption key for a very sensitive server's full disk encryption which is only entered when the system boots up is likely to be very long more random. Conversely, your average end-users login to the workstation which is used every time they want to access their workstation is likely to be shorter and much less random. Despite what any best practice says you need to find the sweet spot of secure-random passwords with usability.

EDIT re: Password rotation : The concept of forcing people to change their password is a contentious topic to say the least. On one hand you forcing them to change their password potentially mitigates password replay attacks. On the other hand you get password rotating and minimal changes (password#1, password#2, password#3) etc.

It's important to understand that Pentesting is not a truthful representation of your threat exposure for one simple reason: time. Penetration tests are limited timeframe engagements, whereas an attack with an axe to grind has a much larger window of opportunity. I might spend two weeks with a client, but once an attacker has a foothold in the network there's no telling how long they might poke around undetected. If I'm running a 2 week pen-test and there's no luck with password replay attacks after a few attempts, I'm likely going to move on to other attack vectors. It's easier for me to XSS or Spear Phish someone that waste CPU power on brute forcing or attempting to re-use people's passwords.

Now with that said, I like forcing users to change their passwords even though I inevitably know that passwords will get recycled. If I set a password policy to have users change their password every 60 days, and remember their previous 6 passwords I know that in a year there are 60 days where a stolen set of credentials might work. As a sysadmin I like those odds, as an attacker I don't. If users could be trusted to use a completely different password on each service they use, then ditching the age-old adage of "Change your password every x days" would become feasible, but that's nothing more than a pipe dream.

As there is no way to enforce staff to use unique password on each service (at least reaonsably unqiue (ie not password1 for your email, password2 for your laptop, etc) then I don't think password policies are going anywhere any time soon. Knowing that passwords will likely get reused, the responsibility then is on the organization to implement additional controls (2FA, network segregation, Intrusion Detection, etc) to round out their internal security.


What information should a error log record?

Usually the amount you log depends on the kind of error. The more critical the more you log.

In regards to other stuff you would want to log

Filename for the file that caused the error would be high up the list, with line number.
Stack trace information if the error was a result of an exception being thrown.

I don't think you can overkill the amount you log when an error occurs as long as its useful. The only time I have seen logs become really bad is when massive logs are being taken even when an error does not occur.

Some more information can be found on the OWASP website - Error Handling and Logging.


If I am reading the syntax correctly, I believe you need to remove your quotations and left parenthesis as it's prematurely ending the query function:

car_info = query("select models, color, running from cars where manual = 1 AND UID = '' OR enabled = 1 # LIMIT 1".format(uid))")

You are posting:

car_info = query("select models, color, running from cars where manual = 1 AND UID = '' OR enabled = 1" )# LIMIT 1".format(uid))")

So try the payload:

' OR enabled = 1 #


They MAY use the same certificate for any *.domain.tld. However, the problem with bugs like heartbleed is that, in case you get hold of the private part of the certificate you are able to intercept (read / modify) any *.domain.tld SSL/TLS traffic and it doesn't really matter what the originally used certificate is (unless HPKP is enforced).


Does Microsoft Remote Desktop require a VPN to be secured?

As often with security, the answer to that is "maybe". In theory, if setup right and if you're keeping your system up-to-date, RDP is actually quite secure. Possibly not the most secure system available but still it can be considered secure enough for most usage (and can be extended if necessary).

The first and most relevant issue you will encounter with RDP is the potential for DOS against your administrator account. This one is easy to understand: if you've setup a limit to the number of failed attempt to log on, someone can simply keep trying to access your account and keep it locked. On unix, you'd use fail2ban to prevent that from happening but there is no clear equivalent in windows (although there are plenty of solutions, from scripts to full-fledged commercial program that will do the same). Another simple solution is to limit the range of IP addresses that will be allowed to connect to RDP in the first place or force users to go through a VPN first. Another option is to use IPSec. Yet another (and better) solution is to add 2 factor authentication to your system: mandating the use of a smartcard for RDP connection makes the whole authentication process very secure, if a bit difficult to setup.

The second issue you're going to encounter is the security of the connection. If you've setup RDP correctly (i.e. you've setup a server certificate correctly, you're forcing network-level authentication and you're using RDP over TLS) , then there is little risk.

Adding a VPN layer on top of this wouldn't add much to the overall security. Assuming you where running it from another machine it would still be a worthy addition since it would improve the security in depth (because in order to compromise the final machine you'd have to break two systems instead of one) but if you're installing everything on the same system, you actually increasing the system's area of vulnerability by adding another potential way to exploit vulnerability.


Anything wrong with using IMAP as authentication for a web app to achieve a kind of easy SSO?

Does this already exist?

Checking login with one service in order to authenticate another one is kind of hackish but actually not that unusual. The Postfix mail server can be configured to check with an IMAP server the same way you describe via SASL instead of having its own authentication - http://www.postfix.org/SASL_README.html. And there is also the infamous POP before SMTP which also relies on successfully authenticating against one service before being able to use another.

And universal web mailers like Roundcube which work with any IMAP server basically use the same method when logging in a user, i.e. they rely on the IMAP server for authentication.

  Any serious security concerns with this setup given SSL/TLS are used for transporting credentials?

The main point I see is that a naive implementation could cause a possible denial of service against the mail server via web. IMAP servers are usually designed to handle several long living connections in parallel instead of handling many short lived connections in a short time. So some rate limiting might be appropriate. Such limits and the comparably slow authentication when using IMAP might also result in scalability issues for your web application.


In the article referenced by the Wikipedia page, things are clearer. Here is the story:

The CryptoLocker malware encrypts the user files with a randomly generated key. In order to enact the ransoming, the malware must send the decryption key to a command-and-control centre operated by the bad guys. A single, fixed C&C server IP or name would soon be shut down by authorities. To avoid this issue, the CryptoLocker authors used the following scheme: the C&C registers random-looking domain names at a rather high rate (1000 per day !). The domain names are generated with a deterministic pseudo-random algorithm, that the malware knows too. Therefore, when CryptoLocker executes on a victim's computer, it tries to use one of the domain names du jour in order to talk to the C&C. The attacker's hope is that law enforcement agencies will have to go through heavy administrative bureaucracy to force the shut down of a domain name, and won't be able to do that 1000 times per day.

Since the malware knows the domain-generation algorithm, a researcher (Dimiter Andonov) reverse-engineered the code, and thus became able to predict the domain names in advance. Kaspersky "sinkholed" three domain names out of the 3000 for three consecutive days; this means that they simply... registered these domains. Which prevented the bad guys from doing the same, but also gives some data to Kaspersky. Kaspersky wanted to make measures, not to contain the infection. With their three domain names, the saved about 1/1000th of the CryptoLocker victims during three days (not a high achievement, generally speaking), but they also obtained statistics on the worldwide distribution of victims: 1/1000th of the CryptoLocker-infected machines, during these three days, talked not to the C&C, but to Kaspersky's systems, who of course told them not to encrypt the data, but also noted who talked to them.

To really block CryptoLocker at the DNS level, all 1000 domains each day would have to be blocked (e.g. by root DNS), which could imply some collateral damage (normal, honest domains may be, out of bad luck, part of the randomly generated names).

The term "sinkhole" is somewhat abusive here. A real DNS sinkhole implies something more forceful: the sinkhole is a DNS server which "somehow" gets inserted in the chain of DNS servers who will get asked for their opinion on the resolution of a given name. A local version is easy: put some explicit host-to-IP information in /etc/hosts (or its Windows equivalent), which will override anything that external DNS system may say about the name. For a more global effect, this has to be done either at the OS level (e.g. Microsoft may push an OS patch which alters name resolution) or on a root DNS (or a "sub-root" like the ones for "co.uk").

In that sense, the difference between a DNS sinkhole and DNS spoofing is that in the former case, it is performed by "good" people. Formally, it is a kind of attack... which reminds us that the vendor of the OS and browser you use (e.g. Microsoft) and the root DNS operators are "trusted": if they are hostile to you, you are doomed.


How does ASIC cryptocoin miners affect the security of scrypt?

The theory of password hashing is that the whole problem is an arms race between attacker and defender. The password hashing function (bcrypt, scrypt...) is made deliberately slow, as much as the defender can tolerate on his hardware. We assume that the attacker can buy the same kind of hardware as the defender, so he can always be at least as efficient as the defender. The hope of the attacker is that he can buy or build specialized hardware that will be able to compute more hashes for the same budget.

Machines specialized for mining coins based on scrypt are inherently good news for the attacker, because such machines make sense only if they do more scrypts per second than a basic PC of the same price. However, this does not necessarily translate to an actual attack model, notably because scrypt is a highly configurable function (both RAM usage and CPU cost can be set) and the combinations for which the miners are optimized do not necessarily match what was used to hash passwords on a given server. The crucial property is how much the mining hardware can be re-purposed for other scrypt parameters.

Another important point is that bcrypt is known to be "more easily broken" with FPGA-based hardware (newer FPGA contain embedded RAM blocks that are very interesting for implementing bcrypt -- each bcrypt instance only needs 4 kB of RAM). Thus, even assuming that the mining ASIC can speed up the attacker, it is unclear whether it will speed him up more than what he can get with FPGA against bcrypt.

You have to remember that password hashing is a problem that spans cryptography, engineering and economics. You must take all these aspects into account if you want to reach a decision.

(Also, scrypt was designed and optimized for a rather specific case, namely password-based encryption of hard disks. This is a usage scenario that is quite different from a Web server authenticating users; when hashing the master password for your laptop hard disk, the system can take a few seconds worth of CPU, and may use gigabytes of RAM. Using scrypt on an authentication server implies moving the parameters out of this zone.)


How does AVG insert its signature into Gmail emails?

Like many other antivirus AVG is doing SSL interception, i.e. it puts itself as a man in the middle into the connection between browser and server. This way it can both read and also modify the traffic and can also add this mail signature.

The browser trusts this active man in the middle since the CA AVG uses to create new certificates is added as trusted to the system/browser. See also Why is 'avast! Web/Mail Shield Root' listed as CA for google.com?.


What prevents an attacker from reverse engineering the player software and using the (valid) keys or the oracle access to make illegal (high-quality) media copies?

There is nothing which fully prevents the hacker and therefore such keys have already leaked, see Wikipedia; AACS Encryption Key Controversy. But there are lots of things to make it harder: code obfuscation to hide the keys, detection of debugging tools to hinder reverse engineering etc. And encryption keys can also be revoked if they get compromised.

A better protection could probably be done with the help of hardware (i.e. TPM, dongle, smartcard...) and such techniques are used in other scenarios to protect the content (Pay TV, game console). But at the moment the loss of profit due to illegal copies is probably not high enough to justify the additional costs and usability restrictions associated with such hardware.


Can man-in-the-middle attacks affect anyone not connected to the attackers network?

Man-in-the-middle attacks can be done by hijacking DNS so that it does not give the real IP address of a host but an IP controlled by the attacker. A typical case of hijacking DNS is by changing the DNS settings in the router. One way to do this from outside of your local network is a CSRF attack. These kinds of man-in-the-middle attacks are done for years and in-mass, see the mass-hijacking of routers in brazil 2012.

Of course another way to snoop the traffic is to employ malware which can be easily distributed through phishing mails or malvertisment. This malware then could inject itself into the browser and do a man-in-the-browser attack to sniff and modify unencrypted and also encrypted traffic.


The point of the pre-master key is to have a uniform format for the master key (e.g. this helps sharing session parameters between multiple front-ends). SSL is generic: it supports several kinds of key exchange algorithms, in particular RSA asymmetric encryption, and various Diffie-Hellman variants. All these methods do not yield "shared secret" of the same size and format. Notably, with DH, you get a group element, in whatever group you are working, which can be an elliptic curve or something else; the shared secret is, as a binary string, somewhat biased, and is not chosen by the client.

Defining that the key exchange mechanism yields a pre-master secret (with characteristics derived from the actual key exchange mechanism), to be hashed into a master secret, thus allows for a better modularity.


Would this be secure enough? (ZF3 & Doctrine module using halite)

What you did right

You're using a library

You chose to use a library to do the encryption for you. Good job! Somehow people still screw this up. Don't be a Dave, never roll your own crypto (unless you really, really understand what you're doing).

What you did wrong

You're misusing terminology

A salt is used when hashing passwords. It must be unique per password, and thus can't be located in a config. A pepper is similar to a salt, but it's the same for each password, and so it can be located in a config. Neither of these has anything to do with encryption.

You're trying to "improve" the encryption without understanding it

Adding a unique value to each string is unnecessary because (good) encryption algorithms use initialization vectors or nonces to randomize their output when encrypting duplicate data. Halite uses XSalsa20 MACed with a keyed BLAKE2b hash. Don't try to make it better, you'll just add complexity to your implementation for no reason.

There is a legitimate reason to pad data before encrypting, and that is to hide the length of the data. Some encryption algorithms allow an attacker to determine the length of the plaintext rounded to a number of bytes, and others allow to determine the exact length of the plaintext. In this case however you should pad all data to the same length (or a multiple of the same length), and the padding needn't be random.


Can Tamper Data (the plugin) modify multipart requests?

According to my experience it works fine (copy/paste and modify and CP again). However i have change only the name of the field to test a path manipulation. And it was a success.
You might have issue with your webapp.


passphrases - lowercase and dictionary words

I would say that this isn't strictly a dictionary attack, since you're not testing words in a dictionary, but strings of words. It's really a brute force with a different "character" set. That lets you use regular entropy calculations.

If the attacker brute forces the password it as if it were a string of lower case characters, then it's 13 long and each token is one of 26 choices. That's 61 bits of entropy.

If the attacker brute forces it as if it were a series of lower case words from the english dice ware list, then it's 4 long, 7776 choices, so 51 bits of entropy. Or, if the attacker brute forces it as lower case words from the OED, 4 long, 181,000 choices, which gives you 70 bits.

Since most people would not use obscure words, in your example, you'll be closer to 50 bits than 60, so a dictionary attack would give better results. 13 characters of random letters would be theoretically much stronger than four words.

(Non-theoreticaly, of course, a password rule requiring 13 characters of gibberish just means post-it notes on monitors.)


TrueCrypt dataleaks that might betray the "Deniable File System" option

The article doesn't mention how did the investigators find the presence of truecrypt volume (that could be easily your answer then :) )

One of a couple of ways you can use Truecrypt is by making containers which basically is an encrypted volume, saved as a fixed size file on your disk.
While there are ways to try to detect a truecrypt volume (entropy analysis etc.), I haven't heard of one that can authoritatively detect the volume.

There can be other indications on the drive that could point towards presence of encrypted volume. Trivial examples could be:

Presence of a file (with a .mpg extension?) which doesn't really belong to any known data format
The aforementioned file being of exactly 1GB !! (or of a fixed size equaling to a whole number of MBs, KBs)
Recently opened entries in various softwares/logs indicating paths like P:\video.mpg (or /mnt/t/video.mpg in *nix) where no such fileshare/mount exists at the time of investigating. Or browser logs/cache of pages opened form that Truecrypt mount.
Programs doing auto-saves - saving your data in non encrypted disk cache while you are viewing/editing a file from encrypted volume which is currently mounted.

None of the above conclusively say the presence of a encrypted drive (not even when considered collectively), but they can consolidate your belief if you have reasons to believe that there is any encrypted volume.


Online transactions: which one is safer - credit card or netbanking?

Most of the protection around using credit cards is legal (will vary slightly across different countries). Due to the nature of the transaction, when you use a credit card, your recipient is not accepting your cash, but the card provider's -- who will in turn charge you back. If you're victim of fraud, you can simply call the payment provider and ask them to cancel the transaction. Unless they suspect you in any meaningful way (i.e. if you do this often), they'll just do it without asking questions. This is why you should keep an eye on your statements to react quickly if need be. Also make sure you immediately report lost or stolen cards (credit and debit).

(btw: This is an excellent answer to the other question you posed, much better written than mine: https://security.stackexchange.com/a/233078/200347)

This is safer than debit card from a liability perspective since with a debit card you are paying with your own money and in case of fraud you'll need to make the recipient return the cash or have your bank cover the expense -- if they agree it's fraud and you couldn't have avoided it (which is variable).

Netbanking is whatever banks want to call their system. Could be a way to use pre-paid credit cards, a way to execute transfers, a way to electronically transfer cash (like paypal), etc. So unless you have further details about what netbanking is for you, it's not possible to draw a conclusion.


Barcodes that cannot be duplicated for products

Sorry, it's not possible to do what you're asking; at least not directly.  Barcodes are inherently copyable.  If you can see it, an attacker can forge it.  Instead, you'll need a different approach to securing the data.

You could physically hide the barcode until it's time to scan it.  Some retailers use barcodes on their gift cards, and hide the activation barcodes inside the package.  The cashier has to tear the package open in order to scan it, and they know not to scan a package if it's already been opened.  You could also consider other technically similar approaches, like a peel-off or scratch-off covering over the barcode.

You could try authorizing your customers separately from these barcodes.  Let's say you had your customer register to buy your product. You'd issue them an authorization code (perhaps email them a barcode that they print out and bring to the store).  Then, when it comes time to scan the product's barcode, you'd require them to provide their authorization code as well.

As others have suggested, you could use a technology that's not a barcode.  Most RFID chips have static data and are therefore clonable, but smart cards are not.


The correct folder to put your script into is scripts/meterpreter/.

Once you copied your script there and launched msfconsole, you can use the run scriptname command to run it.

You can find more details and examples about meterpreter scripting on Metasploit Unleashed. A list of some useful API functions when writing such scripts can be found here and some functions examples here.


While I haven't used SQL Inject Me plugin before, it is hard to tell if you are vulnerable or not by the data and screenshot you shared.

The 302 Moved Temporarily is a HTTP response. It means that the webserver wants to send you to a different page. If this HTTP response was sent to your Firefox it would lead to Firefox loading a different page, such as the index or whatever.


Packets contained no EAPOL data; unable to process this AP

This error happens sometimes when you quit the Deauthentication Attack or make it short.
The solution is to wait until the message highlighted with red shows. It might take a lot of time.


ciphersuites which does not need certifcates, RSA, SHA1 and use AES among opensll 1.0.2j, TLS1.2 supported ciphers list

Yes, DSS suites needs certificates. In practice, many TLS libraries don't support these cipher suites anyway, so it probably doesn't matter.
You're basically going to be limited to the PSK (pre-shared key) suites.  There are several of these suites that support DHE and AES.  Support for these cipher suites while more widespread than support for DSS is still going to be more  limited than for the more popular suites, so you'll have to do some research to determine if this is a feasible option for your application.  I don't know off hand if these are available in OpenSSL 1.0.2j, but if not, you're probably out of luck.


Creating secure random output that is repeatable across machines

This is something that's fairly commonly done, and is the foundation for almost all 2nd-factor authentication methods (particularly those which are either device or app-based). The usual route that is taken is to generate a large random seed, and then use one of many methods to sync it (certificates, QR codes, and old fashioned multi-character alphanumerics are the common ones).

Essentially the problem you're trying to tackle is that of transmitting a potentially large key across a potentially insecure channel, and there's a few routes you can go down. If you're wanting to retain the human element, you could go down the route of a passphrase. Anything which translates to a sufficiently large binary number would do the trick, so a 16-character alpha-numeric passphrase would do the trick. 128 bits would be achieved by 8 characters, I think.


Is there a need to scan images with real-time scanners anymore?

A real-time scanner can either:

look for known vulnerability exploitation (signature based), or
use heuristics to determine if the image is crafted to exploit unknown vulnerabilities

Number 2 seems like a stretch, so I'll skip over it.

Number 1 could be useful if you're running outdated software that wasn't patched for known vulnerabilities.

In reality, if you're not patching your software there's a limited amount of protection you can get from an antivirus/antimalware solution.

Once the vulnerable software is patched for the known vulnerability there's really no point in testing every single file for it. That's specially true if the trade-off is on usability.

  Security at the expense of usability comes at the expense of security.

At the end of the day it boils down to what kind of protection you expect from the antivirus/antimalware.

An antivirus as a workaround for unpatched software sounds like a bad idea, akin to putting a padlock for an absent door.


Are there any benefits to using a semi-trusted network if a VPN is being used?

First you should make sure that the your VPN actually is a full VPN, i.e. includes DNS lookups, IPv6 etc and properly authenticates its peer. This is not the case with all software calling itself VPN. You also should be aware that depending on the quality of the implementation corrupted VPN packets might be used as an attack vector.

A major problem might be the captive portal which is often used in free WiFi networks. Such portals must be usually accessed first with a browser before you can even establish your VPN. If you do this with the normal browser the captive portal can be used to capture existing session cookies to other sites, inject stuff into the browser cache or attack you with a drive-by-download - and all of this before you even had a chance to create your VPN tunnel. This kind of risk can be reduced if you use a specifically designed minimal and fully sandboxed browser to deal with this portal.


Safely store passwords in specific scenario

You seem to be re-inventing the wheel.  The Internet was originally designed for clients that connect at irregular intervals.  The server on the land is your mail server.  The infrastructure machine on the ship can just mirror or buffer the information to the many clients on the ship.  The Internet was designed to solve just this sort of problem, and there is tons of legacy software for this.

Probably you can configure two mail servers that will handle this for you without you having to write a single line of code.  You need a mail server on land, and a mail server on the ship.  When the ship has Internet access, it can query the land-based mail server to get the new mail for recipients on the ship.  There does not need to be an exchange of passwords if the land-based mail had a verified list of email addresses for people on the ship.

Put another way, you can set up a domain for the ship and everyone on the ship is mailbox@ship.com or something.  Then the normal mail routing protocol will deliver the mail to the ship when its mail server connects to your land-based network.

There shouldn't be any password problems if you configure mail routing properly.  The mail server on the ship will check each user's password when they connect to get their mail.


As a mobile carrier, how do you defend against mobile attacks like Stingrays?

Yes, acceptance of a specific crypto suite is up to the SIM/USIM application on the UICC smart card that is colloquially called "SIM card" these days.

Note, however, that categorically disabling weaker ciphers might inhibit roaming. Also note that carriers do usually stand under the influence of law enforcement - there might be very subtle political reasons for them to leave certain things unfixed, especially when it means that they don't have to get involved in surveiling someone themselves.


Prevent metasploit meterpreter process migration

Based on this question, process migration requires the SeDebugPrivilege to create a thread attached to a remote process, so denying it should block the migration process. Sadly, there is no clear definition on how to do it, but seems like this privilege is part of the user / group privileges so using a non-admin user without this privilege should block process migration.

Also any advanced AV-System should be able to detect and block process migration, but I only tested it on Kaspersky which did block mirgration.


Malware: Is there a difference between automounting vs manually mounting?

A mount is a mount, and from the perspective of software (malicious or otherwise), it doesn't matter whether or not the mountpoint was created manually or not. If your /media/your-usb-stick directory is writable by a given user, then any program running as that user will be able to save files to it. Automounting does not change that behavior.

Worms work by spreading over the network, using vulnerabilities to infect machines. It must be executed so it can attempt to exploit other computers through the network. Malware that simply exists as a file on an external drive poses no realistic threat.


High level design for secure web application

The thing about a web app is it's fundamentally insecure if the source code (e.g. JavaScript) is delivered to the client over TLS. You can run the best encryption you want e.g. one-time pads or cascaded stream ciphers, but it will only be as secure as the ciphers and "security" in the TLS suite which is not secure against spy agencies. There have been fundamental flaws in TLS for years. Probably bad by design because NSA is on all the standards committees. Also read about the OpenSSL Heartbleed fiasco. Not to mention the whole protocol is trivially insecure against nation state adversaries with just one CA in their pocket. All they need to do is MITM the connection and swap in a few lines of dodgy JavaScript to steal the encryption keys and passwords.

You have to make a browser extension or run the web code locally from the file path. Use CORS to make requests to the application server. All code is loaded and run locally. All encryption done client side. No server delivered code.

You can also add custom code on the client and application server to encrypt the transport traffic from the client to the app server to protect the meta data as well if you want.


How can I secure my account where only numbers are allowed as password?

Given the fact that site is not using best practices for both passwords and SSL, it's safe to say there's probably other areas they haven't secured. In a perfect world I would say dont use that site but I'm assuming you need to.

Personally I would look to email their support and check whether there are any other more secure ways of doing what you need to do, but if you absolutely have no choice but to use the site then use a password generator such as this to create the strongest password you can and try to limit what information you put onto the site where possible.


What happens if my ISP gives me an IP address that's already being used

The primary problem in this case is not a security one first and foremost; this situation creates apparent packet loss, as the link layer protocol mapping for your IP address will typically change between you and the other node according to the action of a race condition and much traffic will not go to the requestor.  Of course, this does all depend on the link layer.

It's certainly possible that you would see some of each other's traffic, and if you were malicious you could certainly dump it.  Of course, you would probably not get all of it.  However, this is no different from viewing traffic in transit through a mirror port or by getting it out of a router or something - it wouldn't make it any easier to break the security of SSL sessions, for instance.  So, even if this happened (and it would indicate severe incompetence on the part of the ISP), I would not expect an actual security breach unless I wasn't encrypting things.

You'd also see the return traffic of the other person, but not what they send.

In practice, when there are duplicate IPs like this on an ethernet and the nodes do not detect and handle the failure, it's basically impossible to complete the TCP 3-way handshake (let alone negotiate a TLS session) and the connection looks to be extremely poor or entirely down.

Most differences would be as a result of the link layer and how it maps link layer addresses to network addresses, and most security differences would be a function of the application layer protocol being used and whether IPsec is in use.  In IPv6, since you are assigned a prefix and that is what would have to conflict, the consequence would be almost identical except that there isn't likely to be anyone on your network with the same IP as the misdirected packets are destined to.


SAML for transporting authorization information

As Guido points out in his comment, it largely depends on the target system. If the target system has clearly defined APIs / interfaces you can protect, then XACML would make more sense (XACML has an architecture whereby a policy enforcement point intercepts a flow and sends off an authorization request to a policy decision point).

If, on the other hand, the target system doesn't have APIs (e.g. it's mainly a web UI / portal), and if the target system has a rich role-based / claims-based authorization model within it, then you should aim for attribute statements inside your SAML assertion which can be used as assertions / claims in the target system.

The benefit to SAML over XACML in this scenario is that it's probably less disruptive. The benefit of XACML over SAML is that it's more fine-grained and can take care of context (time of day, device...)

You can still use XACML on the IdP side when the SAML token gets issued to provision claims inside the SAML token.

So, what is it you want to protect? Do you control the target system?


There's no "one answer fits all" here. If it's simply a social media app, it might be sufficient to allow concurrent sessions, but also offer a way to terminate one or all sessions if the account is compromised. For many types of games, concurrent access means cheating, so should probably be disallowed, or at least designed in a way that the account can't cheat (e.g. there may be multiple latent sessions, but only one active session). For systems with sensitive information, like HIPAA- or GDPR-related information, 2FA should probably be required, short session times, and concurrent logins should probably be disallowed.

The important thing here is common sense. You need to ask yourself "what's the worst that could happen if concurrent access were allowed?" and "what would the user gain from having such a feature?" If the cons outweigh the pros, don't do it. If there's too much risk involved, don't do it. If it would convenience the user, consider allowing concurrent logins, perhaps with some caveats, such as only having one active session at a time, or allowing session management to disable sessions, and in any case, 2FA should probably be available, if not required.


Firewall log entry: need help in interpretation

This entry also specify that this machine is trying to establish a TCP connection to port  5222 on the remote system. TCP 5222 is, usually, XMPP (Jabber).

The next step is typically to go on the machine and find out which application is trying to open that connection and if it's legitimate or not. How you do that depends entirely on the operating system you use, though.


It's subjective opinion and depends on the purpose of the policy, who the policy controls and who reads it. If it helps, think about the information security policy like the HR Expenses Policy, or the Anti-Bribery Policy.  I have seen specifics in the expenses policy regarding the mileage rate and general statements about submitting in time.  Infosec policies can be regarded as similar.

Generally, infosec policies are either end user policies, eg don't use USB, or IT department policies, eg all end points must have USB disabled.  Then there are baselines and standards: All end points must have End Point Protector X installed.  Then procedures: install X version Y from location Z.  Sometimes you want to mix them up and sometimes you don't.

It depends on who you are writing your policy for.  Some policies are designed to be read by third parties to get through the compliance hurdle.  Where companies are audited by independent auditors such as for ISO 27001 or where a company has, say, regulated clients then the auditors will look at the policy and look for edge cases where the company does not comply.  In those policies, the author may decide not to write "version X is needed" but rather "use the latest version if it is available and possible to install". Or they may want to unambiguously tell users "your passphrase must be > X characters".

Policies are often written to be seldom updated.  Perhaps an annual refresh.  For some regulated industries there can be a huge inertia to changing the policy, but less for the baseline.  So the policy says "implement the baseline" and then the baseline says "configure X with Y".  The majority of policies will, I suspect, be written this way.  I don't have any peer reviewed data to support that assertion, but most policies that I review tend towards the general rather than the specific but then will call out specifics if the business dictates. For example a policy might say "all websites must use TLS" but a policy for a company that has to be PCI-DSS compliant might say "all websites must use TLS 1.2 or better" (or whatever the standard is now ... that's the problem): the policy might even be utterly generic "all websites must have appropriate security controls in place as determined by a risk assessment".  Where policies are used as the lever to control the business then this could well be the case.

As a rule of thumb, when deciding what level of detail to put into your policy:

Consider the audience
Consider if the policy is there to merely get through compliance
Consider that an organisation may get audited against policy and non-compliance against your own policy is generally regarded as a Bad Thing
Consider if anyone will actually read the policy
Consider if a baseline configuration baked into the devops process is a better place for configuration
Consider if you need to have a some specifics, particularly if there is a minimum acceptable baseline


How can I recover files encrypted by Android ransomware?

If the malware is same as the one identified as Andr/FBILock-A by anti-virus firm Sophos, they have detailed removal instructions here:

http://nakedsecurity.sophos.com/2014/07/25/android-fbi-lock-malware-how-to-avoid-paying-the-ransom/

It appears that (according to Sophos) this malware does not actually encrypt files, so you may be the victim of some other attack.

this is an image they posted of the malware:


Digital watermarking for detecting Copyright infringement - video file of customer A and B have same SHA Checksums?

Does this mean if I share this video he can't trace me back?

If the hashes are the same, then you can conclude that the files are identical.1

This implies that the file doesn't contain a watermark tied to your identity. However, there might be a watermark that associates it with the shop where you bought it.

1 Note that shasum defaults to SHA-1 which is broken. Hence, you should start using another algorithm, e.g. shasum -a 256 (or sha256sum, respectively). However, that doesn't mean that it's trivially feasible for the company to generate different videos that produce the same SHA-1 hash. You can safely assume this is not the case here.


How does CleanBrowsing DNS servers make 'Youtube, Google and Bing forced to SafeMode'?

How do they force Google and Co with only DNS into Strict Mode?

Google and Co have special IP addresses responsible for the safe search. Safe search can be enforced by modifying the DNS so that it returns the safe search IP addresses instead of the default ones when accessing the common domains names.

This is in detail described in How to: Enforcing Google SafeSearch, YouTube, and Bing at the OpenDNS support site. A short summary from this article:

Google: make the name server return the IP address of forcesafesearch.google.com when resolving www.google.*
Bing: make DNS lookup for www.bing.com return the IP of  strict.bing.com
Youtube: make lookups for various Youtube related domains resolve to IP address of restrict.youtube.com or restrictmoderate.youtube.com depending on how safe it should be


On my website's account creation form, how to avoid leaking the information that an email address already has an account?

I'm probably stupid and don't understand the issue, but to me it looks like the problem can easily be avoided by providing the necessary information only via email (which an attacker isn't supposed to be able to access). If you don't want to leak any information, then the public messages must not be distinguishable, whether an email is already been used or not. If you really want to be careful, technically, you should also make sure that the response time is the same, to avoid timing attacks. But this, depending on your needs, might be overkill.
So what happens is:

If the email has not been used yet, you display a message like "Thanks for registering, now go check your email to complete the process". The email will contain a link to validate the address, and when the user clicks it the account will be created and enabled. You can also create the account at once, before validation, but you will need to make sure an attacker cannot check if it's been created or not (otherwise that's information that is leaking).

If the email has already been used, then you display the same message (see the point above), for example "Thanks for registering, now go check your email to complete the process". This way an attacker will not gain any additional information. Is the email address already been used or not? The attacker can't know, unless they can read the email. But the user will know, because the message you will send via email this time is different, and it might be like: "You just tried registering at example.com with this email address, but you already have an account connected to this email address. Did you forget the password? Blah blah blah. If it wasn't you, just discard this mesage".

As a result, an attacker will not be able to understand if an account has been registered with a specific email address, unless they have access to that email address. A user, instead, since they supposedly have access to the email address, will be able to get all the information they need, whether they signed up correctly or they tried to sign up twice.


Preventing users from tampering with replay data

You can sign the data, but this leaves the problem that the private key needs to be embedded into the application in order to verify it.
You can store the replay data on a server and allow the friends to access it using their own device.

For an average game, it is likely not worth the effort because the data can already be manipulated at the time it is recorded by modifying the game application. Depending on the type of game, it may be suitable to use fully automated bots, aim bots or map hacks.

Protect application from being modified has some more information on that topic.


Server checking client's password without ever coming into possession of it

Some variants of Password Authenticated Key Exchange (PAKE) allow for mutual authentication using a password; also take a look at Zero Knowledge Password Proofs. Here the server still has the user's password (created during account setup), but during key exchange the client doesn't give the server the password, rather the client and the server run a protocol that proves possession of the password and (in the case of PAKE) establishes a shared symmetric key.

Section 4.2 and 4.3 of the tcpcrypt paper give a useful intro to a couple of protocols (though it does rely on a concept introduced in the rest of tcpcrypt, namely the session ID).

Your proposed method provides authentication of the client to the server, but not the server to the client (c.f. the Internet PKI or the above protocols, which attempt to authenticate servers to clients as well). It is also vulnerable to offline password guessing - given a single example signature over the challenge data, an attacker can go through a password list, generating the key pair and seeing if it matches the example signature.


What can someone gain from basic personal data?

TL;DR: this email is probably just the beginning of the scam.

Like marijuana, it could be a gateway email. The thought here being that if you are stupid enough to respond to this initial ruse, they will follow-up with another claiming to need some additional info like bank account to wire money into, the initial email gives them enough pieces to research your full name, DOB, maybe even last 4 of SSN, etc with a tool like Intellius (for extracting money later).

Not sure what the school can/will do about it. In reality, it's probably an international IP and the laws won't really allow for any prosecution -assuming they are using their real name and real account to register the email server in the first place ;)

Agreed that the school should send a warning about the scam, but that's just IMHO.


Does a PCI DSS category 2x device require the same physical security as a 1a/b?

Disclaimer: IANAQSA

Question: Are group 2x devices required to comply to all PCI in-scope controls?

Short version: Not necessarily, but they could be... it's really up to the assessor.  The use of categories is a way to make more persuasive arguments to your assessor when you want to determine if a device needs to comply to specific controls or not.

Long version:

The category classification system that you're using - the Open PCI DSS Scoping Toolkit - clearly states:

We believe the Toolkit to be consistent with the spirit and intent of the PCI DSS.
However, the Toolkit is not endorsed by the PCI Security Standards Council in any way,
nor is it the product of an official Special Interest Group.

The PCI DSS itself has no concept of categories 1-3 or "infection"*.  This paradigm got thrown out there by people who were sick of dealing with the incredibly ambiguous "connected" definition of scope the DSS actually uses.  As far as the DSS is concerned, everything is either in- or out- of scope.  And if it's in scope, "...PCI DSS security requirements apply..."

So in pure PCI DSS terms, if it's in scope, all requirements apply.

And if you look at the table in section 6.4 of the Open PCI DSS Scoping Toolkit, you'll see that 1a through 2x are all "in scope":

But wait! If you go on to read the "Frequently Asked Questions" in Appendix B of the Toolkit, it directly addresses your question (but might not answer it):

10.6 The Toolkit repeatedly states that for Category 2x system components, such as administrative workstations, not all PCI DSS controls are applicable or necessary. How does one determine which controls are required?

The answer: if you look at the access a 2x device has, its limitations, and its compensating controls, then you can make reasonable arguments that certain DSS requirements don't need to be applied.  And if you can convince your assessor that you've got a good case, then you're all set.  (This is true of any category device, by the way, but you'll never convince your assessor that a 1a device should be exempt from DSS 3.4)

I encourage you to read through the Open PCI DSS Scoping Toolkit, especially 5.5, 5.7, 6, and 10 ("Appendix B").  The same message is repeated throughout:

Use the Toolkit to fine-grain scope,
Use fine-grained scope to reach reasonable agreements with your assessor.

For example:

10.3 Why doesn’t the Toolkit specify which PCI DSS control requirements apply for each sub-category?

The Toolkit states that all applicable PCI DSS controls are required for Category 1 and
2a system components and that no PCI DSS controls are required for Category 3
system components.

However, because every organization and CDE is unique, it would impossible to provide
more specific guidance on which PCI DSS controls are required for every type of
Category 2b, 2c and 2x system component. The Toolkit does provide the basis for an
organization and its assessor to discuss what the relevant risks are and the controls
required to mitigate them.

* Personally, I believe that the choice of the word "infection" to describe scope transition among connected systems was a mistake; I don't know all the politics involved, but I'm reasonably confident that the PCI Security Standards Council will never put their stamp of approval on a document that makes PCI sound like a virus.


Here are a few reasons why using EXECUTE as might be a worse idea:

If the web application has SQL injection flaws the attacker could alter their privileges.
If the web application has a vulnerability that leads to attacker controlled code on the server (file upload, command injection, etc) then the attacker can execute queries with the privileges of the connection user.

Recommending security solutions without understanding who or what you are protecting against tends to result in ineffective security controls.


Do CA Public Audit Records increase the visibility, and risk of attack?

Wildcarding your certs as a countermeasure would be considered security by obscurity and as such is not really helpful.

Your sites can be listed in other databases and there is only finite number of IP addresses out there anyway so it doesn't really matter how hard you try to hide.

Eventually they'll find you and you have to be prepared for them. It can be either a random attack which usually isn't that bad for you to protect from it by obscuring the way to you or it can be a directed attack from someone who knows the way already.

I'd say there are much more important consideration when it comes to securing your host.


Is this possible to brute force 25 billions billions password in less than a month?

Yes, it's possible and it can even be done relatively fast.

Any High End Radeon manufactured in the last years (anything since 5870 forward (and above at performance) but preferably RX580/570 or Vega) or the 1070/1080 series (even 1060 can do relatively good). A good performance reference is for the card to have at least 2T-FLOPs processing power (which all mentioned ones have).

If we take the example of the minimum I stated: Radeon 5870 - near full processing power will try the number of combinations you stated (53E) in approx 283 days. A 1060 half that. One RX580 1/3 that (<95 days). 4xRX580 can do it in under 25 days.

If you use more cards you get less time.

And since 2 TerraFLOPs can do it in 283 days, 2 PetaFLOPs (that you mentioned as a service) can do it in 0.276 days - aka under 7 hours.

Note: the above assumes a good software is used that can take advantage of near the full processing power of a card.

Note 2: For only half of your stated value, of course, only have the specified time will be required.


I was having the same problem and I figured it out. I am using VirtualBox but this solution will work for VMWare also.

First, before opening any VM's, go to File>Preferences (this will bring up the VirtualBox Preferences) and select network. Click the Add New NAT button on the right. Here you need to specify the default gateway. I used 192.168.0.0. Click OK then open up your VM's.

My two machines are now 192.168.0.4 & 192.168.0.5 when at first they were both 10.0.2.15. This was resulting in the closed ports like you say because the Kali machine was Nmapping itself! Now it properly scans Metasploitable 2.


If I create a website using a VPN, am I safe from law enforcement finding out I made the website?

Under the assumption that the blogging service provider doesn't request any personal identifiable information from users (or doesn't check the correctness of the information it does require) and that the suspect only accesses the website from a VPN, the blogging service should not be able to deanonymize the suspect.

But there are two other paths which could be used to deanonymize the suspect:

Following the money. Did the suspect pay for the service? Did the suspect make any money from the website (advertisement revenue, for example)? Then that money must somehow come from / go to their personal banking account. In most places of the world, banks must cooperate with law enforcement.
The VPN provider could assist in finding the suspect. A VPN is not an anonymity panacea. It just shifts the trust from the ISP to the VPN provider. If the VPN provider gets a subpoena forcing them to deanonymize the suspect, they can and likely will do that.

  What other forms of identification could potentially give away that my computer made this website?

When someone gets physical access to the suspect's computer, there are several ways to notice that it was used to create the website. For example:

The password might be in the password manager
The admin portal might be in the web browser history
A cached version of the admin portal might be in the web browser cache

Using full disc encryption can protect their privacy, unless the attacker acquires the computer while it is running or they can force the suspect to reveal the decryption password.


I'm not sure what OAuth gives you that can't be accomplished using other means.  WCF + Rest works very well with claims based authentication bundled in WIF.
Since WCF implies you're using ASP.NET I recommend using Windows Identity Foundation (WIF) on the server side.  Check out this ebook for more info.
Next you need a way to expose AD to your app.  You can use ADFSv2 which is free on Windows 2008 R2.  Take a look at the SQL installation that protects from session replay attacks.
Copying and pasting the credentials from Fiddler isn't something you can completely stop. HTTPS helps, but if you really want to investigate this issue look at this Q&A on Stack Overflow.


Yes it is. The default configuration for the snmp server is enabled. If you do a sh run all | i snmp you should see a snmp-server enable line in your configuration. However if you'd like to actually use the snmp server you'll need to add a snmp-server host x.x.x.x command to the config.


SQL injection is possible but selected queries not working

The MySQL client library doesn't allow multiple stacked queries by default, so you can't execute an arbitrary statement with this injection alone.

This is a handy mitigation against simple automated attacks, but with knowledge of the specific application there is still a lot you can do with a select injection. If you get to see the output of the query you can UNION with another select on a table you want to know about (otherwise see 'blind injection' for more tedious techniques to get that data out). If you have SELECT INTO permissions you can cause some real damage (arbitrary file write possibly escalating to executing arbitrary code).


OAuth 2.0: Are refresh tokens still beneficial when all clients are public?

You got it right: there is no actual benefit. A client secret within a public executable binary can easily be found. Either by analysis of the binary or network traffic sniffing. You can make it very difficult but not impossible.

However, i would strongly recommend against long lived access tokens. If one of these gets stolen you cannot revoke it. Its out there and valid for probably years.
However, if you use refresh tokens and access tokens that live for hours at most you can prevent an attacker from getting hold of a new access token even if they manage to steal the refresh token.


Skype security concerns on an enterprise network

I believe the reports before 2011 are valid. The architecture of Skype hasn't changed since before then afaik. This type of report has been done before by many folk that I've known or worked with as well as myself. I can't give you the finished working papers obviously as it's essentially PII but here's some papers that research was based upon (apologies if you already have them) -

SANS-1
SANS-2
Bluecoat-1
Bluecoat-2

You'll also find that the vendors will regularly publish KBs in relation to Skype and how their new filter/feature extends Skype detection/analysis so it'd be a good bet searching through the Web Proxy vendor (Intel/McAfee, Cisco Ironport, Websense, Bluecoat, Trend, Symantec - trying not to show any bias - etc) Knowledge Bases.


RFC 5246 does include a threat model, but it is described very succinctly and quite informally. It is at the start of Appendix F:

   The TLS protocol is designed to establish a secure connection between
   a client and a server communicating over an insecure channel.  This
   document makes several traditional assumptions, including that
   attackers have substantial computational resources and cannot obtain
   secret information from sources outside the protocol.  Attackers are
   assumed to have the ability to capture, modify, delete, replay, and
   otherwise tamper with messages sent over the communication channel.

The last sentence is the one that most closely resembles an embryonic "threat model".

Your question now becomes: why does the TLS standard not include anything better ? Basically, because nobody bothered to write down a better explained threat model, or to include it in the standard. Also, what is a threat model is unclear; notably, as indicated by the Wikipedia page, there are several conflicting definitions out there.

Ivan Ristić once wrote a nice diagram that looks like this:

and he calls that a "threat model", which I guess corresponds to at least one of the possible definitions of the expression "threat model".


How do URL shortening services like bitly prevent ddos attacks?

You could require proof of work, by requiring that every submissions are attached with a Proof of work, a string that when appended to the original URL, yields a string that when hashed, had a specified number of binary zeros. The number of zeros requested could be configured based on your system load.

This works to reduce a (D)DOS attack from polluting the database with spammy URLs. It doesn't protect against volumetric DDOS attack, which will still bring your service down. To protect against volumetric aspect of the DDOS, you'll need to replicate your servers. You need a server on many parts of the world which will check that the URL submission is valid (the proof of work is valid), before submitting the request to central database.

Additionally, you might also want to check that the expanded URL exists and is accessible before accepting submission, although there are reasons why URL that might not be resolvable to you could still be useful to other people (e.g. links to internal services, non-HTTP URLs).


Is email more secure when not letting any zipped content through?

Well, a bare executable is dangerous in that some users will try to execute it. They should not, they were told they must not, yet they do.

A Zip file, possibly renamed, containing possibly renamed executable files, is also dangerous because some users will rename files, do the unzip, and execute what they find within. They should not, they were told they must not, yet they do.

I have received email virus which used a renamed Zip archive with renamed contents and a password. The email contained detailed instructions on how to "open" the archive, and a "motivation speech" (usually, the promise of a naked female celebrity, sometimes threats of a fiscal nature). That I have received such emails shows that at least some users, somewhere, followed the instructions and got infected. Sad but true.

Email filters try to strike the right spot between insecurity and extreme user annoyance. So they will let pass some cleverly concealed threats, if blocking them would imply stop doing any business. In your case, you are quite happy to be able to send your EXE or DLL through. In that view, blocking unrenamed Zip archives is a "minor annoyance" (which you are effectively working around, hence the "minor") but does block a substantial amount of virus and malware. Blocking more would be "more secure" but would escalate the annoyance to "major" level.


Setting certain response headers only if Referer is invalid

Any headers provided by the client can be spoofed. Using cURL, I can craft an HTTP request to contain any headers I want. Depending on the referrer is clever, but clever is not good enough. If I'm crafting the request as an iFrame, I have full control over the request header.

Here's a use case, courtesy of the brilliant minds at Stack Overflow: https://stackoverflow.com/questions/13432821/is-it-possible-to-add-request-headers-to-an-iframe-src-request

Evil Website --> AJAX script to preload headers -> Your site.

Add x-frame-options on every page in every case, and use framebusting scripts for older browsers.


Dangers of using the web applications provided by password managers

If someone gained access to a self-hosted instance, that would certainly be possible. But if an attacker were able to get the user's passwords, they would need to send them to a remote server or login back into the instance to get the data.
With a self-hosted instance, I would be more concerned with how data is transferred between the server and the client. Do you have a valid SSL certificate installed with strong encryption parameters? Using a self-signed one isn't safe and poses a larger risk than a malicious Javascaript file because it would be harder to detect a network sniffer rather than hack into a server. You could also be susceptible to a man-in-the-middle attack where an attacker forwards you to a server under their control where they can intercept the network traffic and decrypt the data.
https://www.computerworld.com/article/2569788/sniffing-out-network-sniffers.html
https://www.thesslstore.com/blog/risks-of-using-self-signed-certificates/
What are the risks of self signing a certificate for SSL
https://www.rapid7.com/fundamentals/man-in-the-middle-attacks/
Either way, once an attacker has that level of access to a system where they can manipulate the software like that, they'll probably be able to access the passwords in multiple different ways. The best way to prevent unauthorized access to a self-hosted password manager like the one you're describing is to limit who has access to the server.

It shouldn't be publicly accessible on the internet
A firewall should be installed which blocks all ports except the one that is required to be open
A network firewall rule should also block all ports except the required ones and also grant access to computers that need access.
Is Javascript needed in the Bitwarden admin interface? You could install an extension called "No Script" which blocks javascript files from loading on certain websites.

LastPass has a setting that you have to enable where it requires you to enter your password every time before viewing a password in the password manager.
https://bitwarden.com/help/article/security-faqs/


Windows Firewall netsh equivalent of iptables u32 module

I think you have to write your own callout driver to accomplish this. You can't inspect packets in user mode Windows Filtering Platform (WFP).

See Windows Filtering Platform Callout Drivers on MSDN.


Considering browser download is a safe download, according to my knowledge there is no problem in downloading mail attachment but opening is.

Since it is coming via email, there aren't any windows hooks that are attached with mail attachment download that could lead to auto initialization, unless you explicitly open the attachment.

So,

Download the attachment. (Just don't open it)
Create Virtual Environment using Virtual Box.
Move your attachment to virtual environment.
Disconnect the Virtual Machine network.
Make sure to turn off any "integrations" in the VM, such as shared mouse, clipboard, files/folders, etc. Otherwise a bug in one of those sharing systems could give access to your machine from within the VM. (suggested by Moshe Katz)
Enjoy playing with Viruses.


How to handle a malicious SSL/TLS shutdown

In practice, many widely deployed HTTPS servers close connections abruptly, without any prior notice, and in particular without the close_notify. They do that because they want to kill connections that have been inactive for too long (say, more than 30 seconds), and they want to do it even if the connection was inactive because the client is gone (e.g. crashed, or moved out of range of the WiFi access point, or any other similar situation) and will not actually acknowledge the close_notify.

It would be technologically feasible for a server to send a close_notify even to a dead client, and still clean up resources properly, but many server designers find it easier to simply not send the close_notify (this allows keeping the SSL engine and the socket management separate). This is in contradiction with the TLS standard, but we know that real-world developers have an uncanny ability to "cut corners" when they see fit. Note that TLS 1.1 and 1.2 acknowledge the widespread practice of not sending a close_notify, by considering that such a failure does not invalidate the TLS session as a whole (the session may thus be resumed over other connections):

   close_notify
      This message notifies the recipient that the sender will not send
      any more messages on this connection.  Note that as of TLS 1.1,
      failure to properly close a connection no longer requires that a
      session not be resumed.  This is a change from TLS 1.0 to conform
      with widespread implementation practice.

Consequences are not necessarily bad. The close_notify is necessary for security when the application protocol is not self-terminated. For instance, with HTTP-0.9, the client knows that the end of the requested document is reached because the connection is closed; lack of a close_notify means that a truncation attack is possible (the attacker maliciously forces a TCP connection close "early"). However, with HTTP-1.0 and later versions, request and response bodies have an explicit Content-Length, or use "chunked" transfer encoding, both of which unambiguously identifying the end of the body. For a self-terminated protocol like HTTP-1.0, the close_notify is not needed for security.

A situation where close_notify is absolutely needed is for protocols that exchange data before and after the SSL/TLS session, over the same connection (the STARTTLS method). In that case, client and server cannot reliably send data to each other over the connection after the SSL closure if they did not mark the closure with close_notify messages.

To sum up, you may formally react to a lack of close_notify as an ongoing attack or a network failure, but if your communication protocol is self-terminated, then you may simply ignore the lack of close_notify.


What is two full-length key components PCI DSS requirement 3.5.3

Key components:
Let's say you've a symmetric encryption key. To backup the key and achieve split knowledge, you export the key as separate components.

If the key is a 128-bit key, you should get key components which are each 128-bits in length. You can have two or more components. These components can be XOR'd together (a bitwise operation) to recreate the initial encryption key.

These key components should be under the responsibility of different individuals (i.e. key custodians).

With the above, you have split knowledge - no single individual knows the full key and knowledge of a single component provides no means to derive the original key.

You also have dual control - at least two individuals are required in order to recreate the encryption key.

The key store relates to where the key is located - e.g. the data encryption key is likely stored as a cryptogram encrypted with a key encryption key of equal or greater strength.

Verification is typically through review of a documented process, interviews with key custodians, review of logs of key generation and component storage locations.


Securing docker containers on private LAN

Isn't this the default case?  There is a default bridge allowing containers to communicate with each other and you can create arbitrary numbers of bridges to constrain each docker container.
From the documentation:

In terms of Docker, a bridge network uses a software bridge which allows containers connected to the same bridge network to communicate, while providing isolation from containers which are not connected to that bridge network. The Docker bridge driver automatically installs rules in the host machine so that containers on different bridge networks cannot communicate directly with each other.

Also no upstream connectivity:

By default, traffic from containers connected to the default bridge network is not forwarded to the outside world. To enable forwarding, you need to change two settings. These are not Docker commands and they affect the Docker host’s kernel.

As for all security assertions, I would test to make sure it behaves as expected.


Do real-name email adresses hurt the anonymity provided by torbirdy?

First of all:

There are no anonymous email addresses; there may be email accounts at services that do not require a lot of personal data to register and where you can register email addresses for that account which do not contain your name or other information which may provide a hint of who you are. If you use two different email addresses (i.e. john.doe@gmail.com and guesswho@gmail.com) which are linked to the same account on the provider's server then your anonymity will be gone once someone has to power to ask the provider to reveal data.

Some more words of caution:

Many people using Tor for illegal activities got caught because they have been using aliases which contained their first name, year of birth the place they live, like hans84munich@anonym.com. This won't identify someone, but number of people who are called "Hans", are born in 1984 and live in Munich are is small enough to limit further investigations to that target group. You get the idea. Also some people have been re-using avatar pics on the "anonymous" part of the net which they have been using on the other side as well.

Now you would like to know if if

  anonymous addresses (previously only connected to via Tor) loose their
  anonymity when used in the same thunderbird account with non-anonymous
  addresses

To strictly answer to your question, the answer would be: Most likely. But it of course depends on that a Thunderbird Account means to you? Or did you mean to write "Thunderbird instance" as in an instance of the software installed onto a machine?

If I interpret your question in a broader sense, then let's assume you have three email accounts:

john.doe@university.com
jdoe@gmail.com
rumpelstilzchen@catchmeifyoucan.de

where the latter one would we what you consider "anonymous".

As long as you can be sure that the rumpelstilzchen account is using entirely different SMTP and IMAP servers as the other two, I would argue that accessing those distinctly separate servers over one Tor connection will not allow anyone to make a link between the fist two accounts and the 3rd one. I guess this is what you are asking, basically.

Yet there are some pitfalls.

One of them is that a default behaviour in Thunderbird is that there is one SMTP smarthost for multiple email accounts. You can configure this differently, but you have to make sure you do so. Otherwise you may be ending up sending emails for all three accounts over the same SMTP server which would possibly allow to make a link between them.

Many more pitfalls are between backrest and screen, like pasting the wrong signature into an email and the like.

I would rather try to use two different instances of Thunderbird (with distinct skins) or to different MUAs (Mail User Agents aka E-Mail clients) for anonymous and non anonymous mail traffic; just as a precaution.


Nope, that's not actually a different font, it's Unicode. There's no exploit at work here.
Specifically, it's either another language's character set or, more likely, mathematical alphanumeric symbols like these, which are all rendered from the same font:

For other examples of abuse regarding mathematical alphanumerics, search twitter for fakeunicode mathematical or just follow @FakeUnicode, an account dedicated to the oddities of unicode and unicode abuse.
This is a technique used to evade spam detection.
Here's what a computer sees given  rather than Account:
$ echo "Here's what a computer sees given  rather than Account" |hd
00000000  48 65 72 65 27 73 20 77  68 61 74 20 61 20 63 6f  |Here's what a co|
00000010  6d 70 75 74 65 72 20 73  65 65 73 20 67 69 76 65  |mputer sees give|
00000020  6e 20 f0 9d 99 b0 f0 9d  9a 8c f0 9d 9a 8c f0 9d  |n ..............|
00000030  9a 98 f0 9d 9a 9e f0 9d  9a 97 f0 9d 9a 9d 20 72  |.............. r|
00000040  61 74 68 65 72 20 74 68  61 6e 20 41 63 63 6f 75  |ather than Accou|
00000050  6e 74 0a                                          |nt.|

This hex dump shows that  is not ASCII.  is represented by three bytes, 0xf0 0x9d 0x99, which is U+1D670. Contrast with A, which a single byte, 0x41.
Most anti-spam systems parse text using patterns and/or models of word frequencies. By altering the text, your spammer has altered how the anti-spam systems see the message. This message's subject does not technically use the word "account", so a rule seeking that pattern or a model using that word won't recognize it.
Smarter anti-spam systems will account for this in some way by massaging the text into ASCII and/or by specifically hunting this sort of obfuscation technique. Word frequency models can learn about "words" like this as well.


There are no questions you can ask to make sure it's secure, because it simply isn't. Email is often encrypted, but that's only part of the story. Due to the way email works, it may be encrypted between servers, but each server between you and the destination will have a plaintext copy (ie the encryption isn't end-to-end). Even worse, email encryption is almost always opportunistic, so if there is an active attacker they can downgrade it to plaintext.

Emailing medical information is generally a violation of HIPAA in the US, and probably other laws in different jurisdictions (an exception is emailing within a company or between companies that have a way to guarantee encryption is used between their servers).


I suspect it is looking at the user agent in your http request. Try setting the user agent in your HTTP request to Windows NT 5.1

Reference: http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx

If you don't want to do this manually, there are a number of tools out there that will let you specify this point/click style.

Here is a good article that talks about how to start Chrome with a different default user agent:
http://www.parmiter.com/applications/2012/02/RP773


website hacked and all its content erased despite the protections

Is there a possibility to track the one who is trying to hack the website?

Assuming they only deleted your website content and not literally everything off your box, you may be able to find information in your log files. Inform your hosting company about the situation.

Change all your passwords yourself (also change your email password while at it). From reading your comment it sounds as like your hosting company provided you with these credentials to begin with; through email I assume? This is a big no no (Email is an insecure form of communication). Solution: change them yourself, and if you want to be really pedantic, set up two factor authentication (DuoSecurity would be my pick). Basically every time someone tries to SSH/SFTP into your server you will receive an SMS or Push Notification (if set up) asking to allow or deny access to user with IP x.x.x.x.

Also ensure you are using SFTP not FTP, and keep complete backups.

Fortunately in your situation it just sounds like someone peeked at your credentials and only gained access to your FTP stuff. If you have the time you could set up a honeypot but is it worth the time in your situation, probably not.

Goodluck.

P.S The attacker deleting all your content was probably a good thing. (1) it was blatantly  obvious someone gained access; (2) for security reasons you probably would have to erase everything anyway; (3) there are much worse things they could of done; (4) it reflects their intelligence (subject to personal opinion)


Which systems in a network are able to spoof a TCP handshake?

(B, C, D, R), which ones can attack if the target is A?

B and R.

Both B and R can spoof the IP address of E and can see the SYN-ACK reply packet from A to get the sequence number for the final ACK.

C cannot because the ACK will be sent via R that will route the packet out onto the internet.

D cannot because it will not see the SYN-ACKs over the internet.

  (A, B, D, R), which ones can attack if target is C?

R.

R has visibility of all packets on the network, so can view the SYN-ACK and sequence number.

A and B will only be able to view packets for 192.168.150.0/25, packets destined for C will be sent over the 192.168.150.128/25 network only.

D cannot because it will not see the SYN-ACKs over the internet.

  (A, B, C, and R), which ones can attack if target is D?

None. They will not have visibility of the SYN-ACK to get the sequence number.


The best way to detect if the message was spoof or not is to check the message-center. Normally, a spoofed source will have the message-center shows different gateway from the network of the gateway where the originating source is.

Ex.

Spoofed ID: VERIZON
Message-centre: +927566004455

Original ID: VERIZON
Message-centre: +181800001111

got it?


Should the average user with no special access rights be worried about SMS-based 2FA being theoretically interceptable?

There is no real concept of an "average user with no special access rights". From the perspective of an attacker the main point is if the effort needed for an attack is less then the gain of the attack. Even an "average user" might have crypto wallets or precious twitter accounts. Sometimes the gain of an attack is also not that obvious, like when a seemingly unimportant target is hacked as the initial step in a larger delivery chain attack against a more precious and better protected target.

For some examples of successful attacks see

My SIM swap attack: How I almost lost $71K, and how to prevent it
Here's how I survived a SIM swap attack after T-Mobile failed me - twice
SIM swap horror story: I've lost decades of data and Google won't lift a finger


How do big cloud providers guard against VM escape attacks?

Highly customized and patched hypervisors, sandboxes around said hypervisors to mitigate breakouts, and heavy monitoring. Of course, any given server only hosts so many VMs, so a breakout is fundamentally limited to a finite number of guests, if it's able to get past the protections outside the hypervisor. For example, QEMU can be compiled with a hardened toolchain, isolated using chroots, mode 2 seccomp, mandatory access controls. It can be patched to be made more secure, using custom seccomp filters, disabling excess code or features, adding custom, hardened drivers. Custom kernels can be configured and hardened to limit the ability of an escaped guest to compromise the kernel and escape mandatory access controls.

Unfortunately, the answer to the question can partially be answered with "they don't". Many cloud providers do regularly get compromised, they just don't know it, or don't disclose it. I see this happening periodically, and it's not pretty. Sometimes 0days are used, and sometimes little-known public issues with the providers are leveraged. For example, Amazon's higher end dedis not shutting down when switching customers, resulting in their GPUs not wiping VRAM, letting the next customer see what the previous one was doing (stealing secrets in OpenCL, anything which was sent over VNC or with X11 forwarding, etc). The Amazon security team knows about this, but still have not fixed it. They do not tell their customers this. This shows a lack of effort put into security, and a lack of awareness about extant security issues. With something like this which you'd think would become big news being known by few people, it's not surprising that large-scale or advanced attacks against cloud providers can happen without the general public being aware of it. The lack of awareness and news of attacks leads people to wonder how the hell these large businesses stay secure. They aren't.

To my left is a window with vim open. In it is code with a 0day on used recently to break out of a hypervisor on a certain medium-sized cloud provider. No protections were in place. All that happened was the exploit broke out and gained access to the host with the privileges the process the hypervisor was running as. No sandbox or extensive monitoring solutions were in place. A single obsolete syscall causing a kernel vulnerability lead to a compromised kernel and persistence in memory (grsecurity would have mitigated it, fwiw), and subsequent exfiltration of information. This company is worth hundreds of millions of dollars. I'm sure countless people have been in there before. Although this is not real evidence and just my own experience, it hopefully should show that cloud big cloud providers do not in fact guard against VM escapes well at all, with the exceptions mentioned in the first paragraph.


Is traffic subsequent to a SASL/GSSAPI bind encrypted?

Unless you are explicitly using LDAPS on port 636 or TLS over 389, then you are not using encryption. You can verify this with a quick packet capture. I wouldn't even trust that your authentication credentials are protected, but I am not aware of what protections that exist there.

Edit: I may be wrong. It appears that there are some modes of SASL that provide some confidentiality (source):

  In additional to authentication, some SASL mechanisms support integrity and privacy protection of the communication channel after successful authentication. With integrity protection, subsequent LDAP requests and responses are protected against tampering. With privacy protection, subsequent LDAP requests and responses are encrypted and therefore protected against unintended monitoring. Privacy protection automatically entails integrity protection. These different types of protection are referred to as the quality of protection (qop). It is negotiated between the client and server during the authentication phase of the SASL exchange. If the client and server cannot negotiate a common qop, then the SASL authentication fails.

That said, I do not know how thorough this protection is. See this answer for a more in depth look.


Do I have to change my database user password in this situation?

Do you have to change the password?

To access the database with its old credentials the DBA has to be able to reach the db server. If this is only possible from the local network and he does not have access to something like a VPN it is unlikely that he will be able to do any damage. It may very well be that the login you changed prevented him from logging in remotely.

Should you change the password

Totally yes! It shouldn't be that big of a deal and you will regret not doing it when something worse happens. In fact, think to what other accounts the DBA could know the password and change these as well.


In the United States, when can someone legally search my personal laptop? (Government or private security)

Probably not enough context to make any accurate determinations. But here is a shot at it.

  What frequently used law does does the Government rely on to search
  private property?

The supreme court is pretty clear on this that they require a warrant. Even with a warrant, there is some discussions that if your data (hard drive, as an example) is encrypted, you can not be compelled to provide that password. (Of course, some judge could compel you.

  What "domains of authority" are relevant? Is it strictly hierarchical:
  local, state, Federal?

Any of them.

  When can corporations, search private equipment without violating tort
  laws? (as the 14th amendment doesn't apply to them)

Often, an employee signs an employment contract that may allow them to do "anything" This is a "work-around" that is often done in Europe to get around their "tougher" privacy laws.

  For a private example, if I bring my laptop to a mall, does the mall
  security officer have the right to detain my equipment? ... or search
  it?

Perhaps. There very well be a "notice" posted that says you must comply with all the "rules" and the rules may include such searches.


If you want some serious security, you need to think not only about confidentiality (making the data unreadable to passive eavesdroppers) but also integrity (reliably detecting alterations from active attackers). Active attackers are not a sci-fi notion; the typical cheap active attacker is a bad guy who sits in a park or a restaurant and operates a fake "free WiFi" access point, waiting for victims to connect through him.

Integrity must be guaranteed within each individual message (so "AES encryption" is not sufficient, you also need a MAC) and between successive messages (the attacker might try to drop messages, duplicate messages, reorder messages, and mix conversations between various servers and clients).

All of this can be done, but it requires a lot of care and effort, and the final result will be, more or less, SSL/TLS: when your protocol has been sufficiently expanded and fixed to account for all the possible attacks, it will exhibits internal features similar to that of TLS, with comparable complexity. Therefore, there is little gain to expect over simply using TLS.

Moreover, the protocol which is easiest and fastest to design and implement securely (a rather daunting task) is the protocol which has already been designed and securely implemented, so you will save a lot of time and headaches by simply using TLS. In your specific case, where you have a dedicated application, you could use a basic self-signed certificate on the server side and hardcode a copy of that certificate in the client, so that X.509 validation is a simple bit-by-bit comparison (so no need to buy and renew a certificate from a commercial CA). This certificate handles server authentication; once the tunnel is set, the client can simply send the username and password within it.


Robust web application in the means of valid filtration/sanitization is enough in most cases.  Problem you are trying to solve is very hard to satisfy. I am repeating again and again - do not reinvent the wheel, because there are high chances that you will just waste time with no effect on security. For example, look how PHP-IDS is written, how it works, which rules it contains. Also, what would you say about these SQL-injection evasion techniques: http://websec.wordpress.com/2010/12/04/sqli-filter-evasion-cheat-sheet-mysql/ - how would you handle them? Or about XSS - http://heideri.ch/jso/. As you might see, more attacks you want to cover - more chances to get false positive.

I am not saying it is impossible and not worth tinkering, but further we go, clearer we see that attacks becomes more and more complicated. First look whether your problem has not been solved previously and if it is really worth your attention.


A process called ./watchbog is mining crypto currency in our server. How do I stop it?

From my point of view, there is no way to tell if the rest of the server is safe or not.
If I were you, I'd handpick files to save and recreate a fresh server to ensure that it isn't compromised.
Otherwise you could end up like BlankMediaGames and having files getting leaked years later. Better safe than sorry


Why is there a path to a .pdb file in an exe I am trying to reverse?

The .pdb contains information for the compiler. It contains debugging symbols. It also contains names of library's that are used in the application and also names of forms and resources. The reason why you are seeing .pdb path in the exe file is because it was released with debugging turned on. If you got hold of .pdb file it could help you reverse engineer the program.


"Go" subdomains with empty redirect url?

It really depends on the site. Good ones will have you pass an integer in i.e. go.example.com/1234/ which redirects to support.example.com or some such. An open redirect would accept something like go.example.com/badsite.com which would redirect to badsite.

But it is not so cut and dry, some redirect to a page that is passed in... hard to make a generalization here. The behavior I see most often is the passing an int, which checks a DB for where to redirect to.

No way to know but to test or ask the site owner.


How much does knowing the zxcvbn password strength help an attacker?

I'd be happy to explain my comments further :-)

Unfortunately it's not a simple explanation.

  For a bcrypt-hashed password, how much of an advantage would this give the attacker? Can this be quantified?

Quantifying this will be hard since guessing at the runtime of an algorithm is tough, especially if the attacker is allowed to make specialized chips for the job.

So no fancy math :-( but I can still give an intuition-based answer;

bcrypt is designed for hashing passwords in a way which is robust to offline dictionary attacks, meaning that, among other things, it is slow. Slow means that an attacker who is brute-forcing has to do more computations per guess, and therefore can't make as many guesses per second. Or, in economic terms, the amount of money that an attacker has to spend on processors and electricity in order to crack your password skyrockets when you use a nice slow hash function.

To illustrate the point, this table, taken from a paper by Colin Percival (full reference below), shows the estimated cost of hardware you'd need in order to reliably crack a hash in a year (note that this is the cost for the number of 2002-era processors you'd need, it completely ignores the costs of electricity, power supplies, cooling, etc).

Now that we've established that slow is good, and that good hash functions are slow, let's talk about zxcvbn.

zxcvbn is meant to be a javascript dohicky that runs client-side without lagging up the page, so compared to PBKDF2, bcrypt, and scrypt, it is lightening fast.

To actually answer your question, imagine that I stole a password database where each row looked like this (which is what I believe @ScottArciszewski was describing in his comment here):

username        bcrypt_hash                        bgcypt_salt                zxcvbn_score
happyfish23     IjZAgcfl7p92ldGxad68LJZdL17lhWy    N9qo8uLOickgx2ZMRZoMye     32.827

Typically a brute-force attack will take a password from its dictionary, hash it, and see if the hash matches the one in the stolen database, if it does then I've cracked your password, otherwise I keep trying until I find one that does match. (This can either be done online one-at-a-time as passwords are guessed, or as a pre-computed rainbow table, but either way, slowing this down costs time and money, esp. since you need a different rainbow table for each alg + iteration_count  salt combination)

With access to the above database, I could use the zxcvbn score as a filter; if the zxcvbn scores don't match, then I already know that it's not the right password and there's no point wasting time on the bcrypt calculation. So I only need to compute bcrypt if zxcvbn matches. Since zxcvbn is basically free, compared to bcrypt, it's not unreasonable that a brute-forcer could go from 10 guesses / second to millions of guesses / second using this trick.

As for the second part of your question:

  Also, other comments mention that reducing the precision of the entropy reduces the attacker's advantage. Would storing only the score (0, 1, 2, 3, or 4) effectively eliminate the advantage?

Yes, this would effectively eliminate the advantage. The reason why basically falls out of the explanation above. Let's assume that the original database stores a 5-digit zxcvbn score, and that passwords in the brute-forcing dictionary are uniformly distributed over zxcvbn scores (a terrible assumption, but it makes the logic easy). You would only expect the zxcvbn scores to match 1 / 100,000th of the time, so you only have to compute a bcrypt for every 100,000th guess. But if instead you store a lower-precision version of the score, for example {0,1,2,3,4}, then you'd be forced to compute bcrypt for every 5th guess. You're still giving the attacker a ~5x  speedup, but that's WAAAYY better than a 100,000x speedup.

REFERENCE:

Percival, Colin. "Stronger key derivation via sequential memory-hard functions." Self-published (2009): p. 14 (link to pdf)


How many bits of entropy should I aim at for my password?

Password meters are no good. Well, that's a bit simplistic, so let me say it in more details: a "password meter" application like the one you used is mindless and generic; what it measures is the effort of breaking your password, using the mindless and generic strategy that the password meter author thought of. In particular, that password meter system has no idea that your passwords have been generated by assembling words taken randomly from a short list. However, an attacker who is intent on breaking your password will know that, and adapt: you just wrote it on a public forum, so it has become public information.

A correct entropy computation does not work over the actual password value, but over the process by which the password was generated. We simply assume that the attacker is aware of the process, and knows all of it except the actual random choices. With 4 words from a list of 5000, you get one password in a set of 50004 with uniform selection probability (that's an important assumption), so the entropy here is 49.15 bits (because 249.15 is approximately equal to 50004). With 3 words, you get 36.86 bits. For more on entropy calculation, see this answer.

(The wisdom of entering your password in a Web-based "password meter" is questionable, too. The one you link to claims that it does all the computations in Javascript and your password does not leave your browser, but did you really check the Javascript source to make sure of it ?)

As far as passwords go, 36.86 bits of entropy are rather good. Entropy from passwords selected by average users is much lower than that. Such a password will be broken by an attacker who got the corresponding hash IF the hash was not done properly (e.g. some homemade construction with a couple of SHA-1 invocation), but even then chances are that other users will fall first.

However, you are doing something real wrong. It is right there, in your first sentence:

  I mainly use 2 passwords: 1 is a 4 word full lowercase passphrase of 18 letters long which I use wherever possible.

Emphasis is mine; it shows the problem. You are reusing passwords. That is Bad. You shall not reuse passwords. When you use the same password on N sites, you lower the security of your account on all sites to the level provided by the worst of the N. Moreover, when that site gets hacked and your password stolen, and your password shows up on lists of login+password exchanged over P2P networks, you will not know which site did it wrong. A lot of sites still store plaintext passwords (a shooting offence) so any widely reused password MUST be assumed to have already leaked.

If you use site-specific passwords, then any damage will be contained to the specific culprit. Of course, this implies some storage system on your side, e.g. KeePass, or a low-tech "passwords.txt" file (you have to take care of where you store it and use it, but that can be managed with decent physical security), or even a printed list that you keep in your wallet. In practice, separation of passwords for damage containment will be a lot more important to your security than password entropy.