195 points · by omnibrain · 6y ago · 57 comments
It's a brilliant podcast - there's some very interesting stories and interviews, my favourite recent one being The Courthouse: https://darknetdiaries.com/episode/59/
I still find myself listening occasionally, so it's hard to criticize too much.
Some examples: Thanks to corona, tons of people started using usb headphones. The bloody thing needs local admin for almost weekly firmware updates. No idea why, but if you dont do them, a windows update for the driver will break them soon.
VPN! If you dare to log on with alternate credentials, it ends your connection. Hence any admin on a remote machine can only happen by a local admin.
Banking software pushes an update and immediately refuses to do any payment until you upgrade. The (nice) people who should package that upgrade are swamped and need months, at least if you manage to get a budget to let them package it. After that, an infosec review might take more weeks.
Printer drivers. No admin? No printing! Bonus points if vendor decides to publish the driver in the app store, which is blocked by group policy for everyone including admins.
ctr alt del needs local admin to kill a task.
As a bonus, infosec is the biggest hurdle: If they take weeks to approve any kind of admin access,and keep asling bureaucratic questions, only big problems that burn for weeks are worth solving. We have expensive software being unused because no one wants to do the battle to get access to fix it. I would love to drop some privileges, if only I trust I could claim them back when shit hits the fan.
What are the Linux equivalents of pass-the-hash, TAM/PAM/PAWs etc?
In short, pass-the-hash is a technique by which it is possible to authenticate to a windows system using the hash of a password, instead of the password itself. The NTLM hash is the secret, and does not need decrypting to authenticate.
NTLM authentication over the network can be redirected to other machines if they don't have traffic signing enabled (default only for domain controllers). So this gives rise to 'spreading' over the network in two ways:
* Steal the hash out memory of a system where you've got root access (called SYSTEM in windows terminology).
* Trick an administrator's system by connecting to your system somehow, and redirect the authentication to another system to take control. There are various techniques to do this, which I won't explain in this answer.
Given this known weakness, TAM/PAM/PAWs are all procedures/and a tiering architecture to prevent those secrets from being compromised.
A PAW, privileged access workstation, can be seen as an equivalent to a linux sysadmin's bastion host, roughly. It contains all private keys to all systems, but is well segmented, audited, and protected. This is the system that you use to perform administrative tasks that can't be done with any lower level of privilege. Say, the system that has the root account to all your production servers, for example.
PAM is the set the set of policies around logging when highly privileged accounts are used, which systems they can access with what privilege, etc, who can use them, how to approve actions by them, etc.
In short, they are the frameworks and policies used to combat the security weakness of these legacy protocol designs, and the reality of running big networks with guaranteed attacker activity in it.
Hopefully it doesn't? That would be poor design. It typically is just on a network segment that the firewall rules allow it to access the other servers.
So, although it does not literally house all passwords/keys/whatever to your network, it has access to a system that indirectly does.
Normal jump hosts should not have your private keys I guess, but I thought it was the closest analogy.
Just put it this way: if an attacker gets on that system, it's complete game over.
Microsoft's systems don't like to send your plaintext password over the network. Rather than either get rid of passwords or at least secure that so it isn't a problem any more, they do the hashing on your machine and send the hash to wherever it needs to be authenticated. This behaviour enables Pass-the-hash.
Since we can authenticate with the hash, not the password, we don't even need to know the password. If we break into one system that knows the password hash for JimSmith in order to authenticate JimSmith then we can tell other systems we're JimSmith and present that password hash and they'll accept it.
So malware that gets enough rights on a machine with a bunch of people's password hashes effectively gets the ability to log in as them on other machines, on which maybe it can ascend to equivalent rights and get more hashes, which it can use again, recursively.
Pass-the-hash isn't a thing on Linux itself, it's a consequence of crypto-illiterate design in Windows. Arguably that design pre-dates modern Windows, ie it isn't the fault of the people who built versions of Windows you use today. On the other hand though rather than just outlaw this behaviour entirely they've chosen to try to mitigate the worst effects and whose fault is that?
However, it can, at which point you're back to the same problem. The vulnerability is with the protocol, not the operating system.
Modern versions of Active Directory enable strong protections for Kerberos that almost entirely stops the majority of the Pass-the-Hash or the Golden Ticket attacks. However, this isn't on by default even in Windows Server 2019 running a domain in 2019 mode for "compatibility" reasons.
I put that in air quotes because it's an excuse, and this is where Microsoft has consistently dropped the ball. They refuse to change security defaults, even when it starts getting absurd, and then lay the responsibility (and blame) at the feet of their customers.
For example, domain trusts between two Windows Server 2019 DCs will use NT4-era RC4 ciphers by default, downgrading all AES-capable devices across the trust.
Similarly, newly created accounts will always default to RC4, allowing downgrade attacks.
SMB is neither signed, nor encrypted by default.
Up until very recently, Windows Server has TLS 1.1 and 1.2, but they were disabled. Now, they're enabled, but so is TLS 1.0!
So on, and so forth.
That's the real issue. It's not that Windows is "crypto illiterate". That's like a person who can't read. No, it's like a person that can read but refuses to.
Could you tell more why do you think so?
For what I remember, Linux in this regard is exactly the same as Windows: you have to install and configure Samba 4 or FreeIPA in order to get a kerberized domain; you also have to join the clients into domain exactly the same way you would join windows clients.
In Windows, your servers out of the box won't run the necessary services, you have to install the AD DS server role. You have to join the clients into domain.
So there's nothing like AD or Kerberos on Windows by default either.
They changed a lot of security defaults with Windows Vista and literally(figuratively) everybody dumped on them. It got called worst Windows ever, unusable, and names I don’t want to spell out from the public and the press. That made them reluctant to attempt such drastic measures again. But at least they disable SMBv1 by default nowadays.
In fact it has been given a CVE number and fixed in obscure systems where it was done, only Windows gets to shrug and say it's hard so we won't fix it. e.g. CVE-2005-3435
In Windows every user - anywhere in the world not just within one organisation - with the same password has the same hash. Worse than a PHP app from the turn of the century their most sophisticated password hash scheme is MD4(password). This makes the mistake that results in Pass-the-hash almost irresistible.
Because a Linux system uses salted (and pessimised) hashes, it is not tempting to try to authenticate remote hashes because you're going to have to build a multi-step protocol, passing parameters to the client so it can perform the hash. You'd probably instead look at existing protocols and discover SRP (or in the modern era any sensible asymmetric PAKE). This immediately shows you a better path forwards with no Pass-the-hash.
But because Windows has this constant 16-byte hash it is tempting to use that for authentication. You can do a bit of hand waving to avoid confronting how insecure the result is:
‣ Bad guys can't possibly know this 128-bit value because it's MD4(password) and there's no way to find that without knowing password. Therefore we only need to check that the 128-bit value is correct and we've authenticated the user.
‣ Storing the 128-bit value locally is fine because it's MD4(password) and you can't reverse MD4 to get the password back so it's not a secret.
Only when you see these arguments next to each other it is obvious this is absurd. So long as they're on different pages of a document, or preferably made in entirely separate discussions at Microsoft, the mistake is unnoticed.
You've engaged in the same equivocation that Microsoft uses by adding "or Golden Ticket attacks". Microsoft documents about Pass-the-hash routinely argue that this is just the same as any other stolen credentials attack, so it's not Windows at fault nobody could be expected to do better. This is definitively wrong and we need to call them out on it.
That's the fault of reality. Disable this today and big chunks of the world will just stop working. That's why they try to push to disable their stupid design mistakes of the past instead of just disabling them cold turkey.
Testing whether disabling a weak auth option won't hurt anything significant within your typical medium to large organization with 20 to 30 years of IT history is a timely operation and major pain.
Any mistake can be extremely costly - think about few hundred expensive employees, doctors, heavy equipment operators, whatever - sitting without their working tools for hours or days because of a stupid security checkbox.
There are two requirements for this to work, both much more common in the wild then hip HN DevOps crowd would like you to believe:
1. root or other privileged accounts share the same password across the internal infrastructure and SSH is configured to allow password authentication for root (that's not the default, but it's usually enabled when admins believe that the network access is sufficiently restricted anyway)
2. requirement for admins to normally login as an unprivileged user and gain superuser rights when necessary through su or sudo (for auditing purposes)
The attacker gains superuser access on one system, then tricks admin to log in and gain root privileges, disclosing their password during that process (by swapping binaries, process injection, reading memory, rootkits, etc).Just gaining access to the admin's login account (ie. one from which the admin runs SSH) is enough - alias sudo=/home/admin/.trustmeimadolphin.sh in .bashrc and wait.
I don't mean that the author is wrong, just that he is stating his opinions strongly as facts, for an instance regarding ADFS vs SSO with Hash Sync, the statement that the latter is much better is stated as an obvious fact, without much of explanation of justification.
Since not everyone would agree, for instance some security teams I have the pleasure of working with/against, more facts and reasons and less assertions could have done better.
Dev (local administrator access ok, production access not ok)
Ops (local admin access not ok, production access ok)
In the ideal setup NotPetya would have been less of an issue for Mærsk should only have allowed whitelisted software to run on computers controlling critical infrastructure. It’s just a solution very few choose to deploy.
Maersk claims NotPetya cost them $250M to $300M [1]. Assuming a criminal organization could demonstrate to Maersk that they could do an attack with similar effects they should be able to extort Maersk for a similar amount of money. If we discount due to unknown information, ROI, etc. I think it is reasonable to say that an extortion demand for $100M, assuming a credible demonstration that the criminal organization could pull off such an attack, would be an economically sound demand and likely to be paid. A criminal organization, considering their own ROI, would probably be willing to invest $30M for a $100M return. For $30M an organization could hire 30 full-time security specialists for 3 years at SV wages to identify an attack with similar effects.
Does anybody here think that their new system could resist such an attack even assuming they adopted all recommendations proposed?
Does anybody here think that there is any deployed system in the world that could resist such an attack?
Does anybody here think that even adopting and correctly practicing all practically deployed recommendations of the security industry that a system could resist such an attack?
All of my research points to no on all of those fronts. And, assuming the answer is no, then adopting all of the recommendations provides no meaningful protection to Maersk or any other company in a similar position since it would still be extremely profitable to attack them. Therefore, any company in a similar circumstance should probably not be deploying connected systems that allow this level of attack.
If the answer to any of those is yes, could you provide an example and evidence that supports that claim? I would sorely like to find a credible deployed case.
[1] https://www.wired.com/story/notpetya-cyberattack-ukraine-rus...
Nothing could be further from the truth. Only ignorant amateurs believe that security is an all-or-nothing game.
By making your system more difficult to break into, you:
* increase the effort and thus cost for the attacker, thereby reducing the number of opponents that can successfully attack you
* reduce the damage they can do before the attack is discovered and stopped
* make yourself a less attractive target compared to others
> Therefore, any company in a similar circumstance should probably not be deploying connected systems that allow this level of attack.
That is simply not an option. You'd increase operating costs far more than the damage caused by this attack, and at the same time lose capabilities that customers have come to expect. Most of the cost of this attack came from having to operate without connected systems.
To go through your arguments in order:
Increasing the effort to attack is meaningful if it reduces aggregate harm in excess of the cost of implementation. In the specific case of the NotPetya attack on Maersk and generalized to similar attacks, there is no evidence that any of the proposed measures would meaningfully reduce the probability or raise the cost to be other than extremely profitable (this is my statement that $30M cost of attack is profitable). This is because the benefit of attack is so high relative to the cost of exploit development and deployment. So, in the specific case of techniques designed to prevent large, valuable attacks, it has no significant impact since you would need to raise the cost of such an attack to around the benefit of doing such an attack.
Reducing the damage they can do would be useful. The damage done in the Maersk attack occurred over the course of a few hours at most. Any defense against such a technique would need to already be prepared or completely automated. From my reading, damage mitigation usually occurs far after and mostly only prevents the marginal long tail, so I will contend, as in my previous post, that an organization with $30M in funding would be able to do the same amount of damage to any system given that they have the element of surprise and reconnaissance.
Making yourself a less attractive target is only meaningful if nobody wants to attack in you particular, it is not easy to wantonly attack all vulnerable parties, and the attacker does not have enough resources after attacking all even more profitable targets before attacking you since, as we stated before, it is still very beneficial to attack you. For the first, that is a bad bet when running a large-scale multinational. For the second, that is literally what software is good at, mass synchronized automated attacks. NotPetya is literally an example of a wanton attack. It is mentioned in that article that Maersk was not even the target. They were accidentally attacked for $250M in damages. Being a less attractive target means nothing if somebody has a weapon that hits all attractive targets at the same time for no extra effort. And for the third, that is a terrible bet in the long run because profitable targets means they have money after each attack, so they will have money to spare to go after you. The only comfort is that it may take them time to hockey-stick to the point where they can saturate the market, but saturate they will. We are already seeing this with the increase in attacks with meaningful economic upside for the attacking parties instead of cheesy little $200/computer attacks.
Not deploying vulnerable systems is always an option, it just depends on the cost-benefit analysis as you state. My thesis is that the cost of vulnerable systems is, in the long run, significantly worse than almost all companies realize and there is no effective solution. My justification for this is that I am firmly of the belief, as my questions above indicate, that there is no company that can defend against a $30M attack and that a $30M attack can easily and credibly cause $300M in damages, and, even assuming good-faith extortion so they do not just extort for more money with the same attack, there are enough more $30M attacks that can cause $300M in damages that any such company will go bankrupt either from paying the extortion or from the extortion following through on their threats.
As a thought-experiment to go with this, if Maersk offered a $30M bounty for each unique vulnerability discovered that could cause them over $300M in damages, do you think they would run out of such bugs first or go bankrupt first? If the answer is "bugs first", why do they not offer such a bounty since each such vulnerability discovered is at least a 10:1 ROI for criminals and thus would be highly attractive to discover?
Just to get ahead of a common response to the above thought experiment corollary. Some people will respond that companies do not need to offer that much to get such vulnerabilities reported to them. This indicates that the problem is even worse than I stated since the cost of discovery is lower which means the criminal ROI is even higher. If they offered $30M for all such vulnerabilities they would be more likely to remove the highly attractive 10+:1 ROI attacks that can do tremendous amounts of damage to them which is a great ROI for the company.
The whole point of InfoSec is to find the right balance of investment into preventive measures and incident response teams so that the cost/risk/reward ratios of an attack make it non viable for economically motivated attacker.
That is not how these attacks happen, that is not what happened at Maersk, and that is not what the article is about.
The breach happend via compromised third-party software installed on a small number of regular workplace PCs. The big damages happened largely because sloppy privilege managment allowed the attackers to hop between systems and gradually acquire more credentials and more privileges via weak or reused passwords and accounts shared across systems and functions, until the attackers controlled thousands of PCs and servers across the entire international company.
This kind of thing is a process, and the amount of damages depends mostly on how fast the attackers can gain more privileges vs. how soon they are noticed and countermeasures taken.
Better privilege management, as suggested by the article, can easily slow down that process to a point where it won't cause significant damage.
And your whole extortion argument hinges on the idea that an attacker can demonstrate the ability to cause X amount of damage without actually doing it or giving the victim information that can be used to prevent the attack. That is not how it works in reality, except in the case of DDOS attacks, which are an infrastructure rather than a security issue.
In reality, the amount of damage an extortionist hacker can put a price on is only the amount they can undo or provably refrain from doing in the future. Specific examples of this are mass-encrypting data and threatening to publish trade secrets. And those are things we see happening in reality, but the amounts are much smaller because they cannot include the large-scale disruption of operations that Maersk experienced.
By your logic, the form of extortion you describe should already be happening, constantly, to every large company on the planet. It should be the most profitable form of organized crime ever.
But that is not happening in reality. Because in reality, security and security breaches don't work like you seem to think they do.
There are multiple examples of organizations successfully thwarting advanced attacks by following (and exceeding) industry best practices. Most of that stuff isn't disclosed to the public unfortunately. Coinbase incident from the last year is one such example: https://blog.coinbase.com/responding-to-firefox-0-days-in-th...
Unfortunately, that example is about 2 orders of magnitude (100x) cheaper to do at market rates than the standard I proposed before the questions of $30M. I arrived at the number of the thwarted attack by looking at Zerodium payouts https://zerodium.com/program.html where a Firefox RCE+LPE goes for up to $100K, so even if we say both such exploits were a RCE+LPE (they are not, the pair amounts to a single RCE+LPE) two such exploits is only on the order of $200K. Adding in the cost of social engineering and any custom work, it probably only amounts to a $300K attack or so. I think it is fair to say that achieving 1% of a standard is inadequate to be a valid example of achieving a standard.
If I want to be even more pedantic, the attack was not even targeted at Coinbase since it appears to be part of a larger-scale opportunistic attack. I think you would agree that a more targeted attack that used all resources allocated to the various targets to just Coinbase would be harder to defeat, so we should actually be distributing the cost of attack across all the targets when evaluating the effort level of the attack on Coinbase itself. The article also indicates that the exploit was active for hours before it was stopped. That is more than enough time to cause the vast majority of damage if intended. In this particular case all they did was exfiltrate credentials and documents, but in many cases that is already the majority of the damage intended. As another example, the Maersk attack in the OP only took a few hours to do the $250M of damages.
So, your math just does not represent real life. Criminals that have 30M lying around are looking for a way to get out and would rather invest their money into legitimate(ish) businesses with lower ROI, criminals that don't have 30M would rather invest into multiple smaller campaigns with higher ROI rather than putting all their eggs into one basket, developers that can attract valley level salary on black market can also find positions in the valley or at defense contractors.
On the other hand just because company faces X damages does not mean they are willing to pay anywhere near to X to avoid them. Ethical issues aside, Maersk would have faced impressive damages even if they decided to pay out ransom. Their operations would have been disrupted regardless, they would need to carry out the massive data restoration anyway. Their networks where compromised and there were no guarantees about consistency/integrity of restored data or that paying out ransom wouldn't make them even bigger targets and that hackers (possibly some other crew) wouldn't return next week through the same or different vulnerabilities. So they would need to plan extremely fast migration to win10 in any case, as well as fixing their network architecture, permission systems, putting in place mitigations, buying new defensive solutions and requiring various consulting services. It is hard to say how much money would they be able to save if they would have chosen to pay ransom (and if NotPetya was a ransomware), but it wouldn't be anywhere close to 300M, maybe just <10M.
> If I want to be even more pedantic
That's ignorant not pedantic. Attackers spent month on spearphishing attacks targeting Coinbase engineers specifically which included making verifyable fake identities and compromising Cambridge web & mail systems. That's exact opposite of a large-scale opportunistic attack.