Live data from Hacker News

How we secure Monzo's banking platform

monzo.com

131–140 of 148 posts

Re: How we secure Monzo's banking platform

#131
post #28

Disgruntled former Monzo customer here. Do they still have a haywire fraud detection system that randomly freezes innocent people's accounts? It's happened to countless users and the customer experience when they do it ("we refuse to tell you why" and in some cases holding onto their money for months) is a kafkaesque nightmare. https://www.vice.com/en/article/bvg7n3/monzo-freezing-closin... https://www.reddit.com/r/U…

No UK bank will ever tell you why your account is frozen, and this is why: https://www.cps.gov.uk/legal-guidance/money-laundering-offen... . Source: used to work on Monzo's financial crime team.

[deleted]

Re: How we secure Monzo's banking platform

#132
post #28

Disgruntled former Monzo customer here. Do they still have a haywire fraud detection system that randomly freezes innocent people's accounts? It's happened to countless users and the customer experience when they do it ("we refuse to tell you why" and in some cases holding onto their money for months) is a kafkaesque nightmare. https://www.vice.com/en/article/bvg7n3/monzo-freezing-closin... https://www.reddit.com/r/U…

[deleted]

Re: How we secure Monzo's banking platform

#133

Earlier quoted context omitted.

Genuinely, would you be happy with just container isolation between you and other customers of your cloud provider? Most people absolutely would not.

> "Genuinely, would you be happy with just container isolation between you and other customers of your cloud provider? Most people absolutely would not." But that's exactly how VPS hosting works today - you don't get your own private blade unless you're ready to pay premium prices and have the competence needed to run them yourself. The technicalities of how private resources in a VPS are isolated from each other wil…

> But that's exactly how VPS hosting works today

No, VPS is isolation by virtualisation, not containerisation.

The clue is in the V in the name.

Re: How we secure Monzo's banking platform

#134

Earlier quoted context omitted.

Most serious security teams do not consider containers a security boundary. So it’s not a sandbox inside a sandbox, it’s just a sandbox. Gvisor and firecracker are the most popular sandboxes for containerized workloads.

I think this is outdated. Docker is a security boundary. There is no built-in way to get out of a Docker container just by asking by default (if you mount the socket into the container, it's trivial). How good of a boundary it is may be another story. There's some seccomp filters going on and namespacing is pretty sweet too. But an attacker can escape by exploiting the kernel, which I think most security people would…

The reason that containers are not generally considered a security boundary is that many of the namespace primitives were _not designed_ as a security layer, they aren't designed to actively reduce the privileges from the current user's context. Since most containers are started as the root user, the namespace transition inherits root's permissions even if they're later dropped. Without SELinux or seccomp restrictions, root can still pretty much do anything to the host even inside the containers.

For the most part this is troublesome when parts of the kernel or host userspace code are not fully aware of the different forms of namespacing (there are still portions that just check for an effective UID of 0, without checking whether they're in a namespace for example). These are the components where a lot of container breakouts happen and is largely mitigated by having internal processes in the container not running as root in the namespace. Dropping privileges to a different user still trace's it origin back to the root user on the host, so in some cases being partially aware of namespaces in a section of the kernel or host user code actively hurts the security by tracing the user back to root and using those privileges again. SELinux really tightens the potential to pull these shenanigans, but most production k8s clusters at least that I've seen are built on Ubuntu where those protections aren't available. In this case the security layer is once again SELinux not the namespacing.

As long as the container runtime is performing the various namespace isolation primitives starting from the root user these container bypasses are going to be a risk. There are 'rootless' versions of containers which can only use the privileges available to lower (presumably heavily restricted) user but those aren't widely used. Once again this is relying on the security protections of the host user authorization, not on the namespaces.

The networking analogy is NAT. People treat it like a security layer as it kind-of-sort-of looks like an ingress firewall since you can't directly address devices inside a NAT, but its not and can be pierced pretty easily. NAT is not a firewall. Namespaces are not a security layer.

Re: How we secure Monzo's banking platform

#135

Earlier quoted context omitted.

Most serious security teams do not consider containers a security boundary. So it’s not a sandbox inside a sandbox, it’s just a sandbox. Gvisor and firecracker are the most popular sandboxes for containerized workloads.

I think this is outdated. Docker is a security boundary. There is no built-in way to get out of a Docker container just by asking by default (if you mount the socket into the container, it's trivial). How good of a boundary it is may be another story. There's some seccomp filters going on and namespacing is pretty sweet too. But an attacker can escape by exploiting the kernel, which I think most security people would…

[deleted]

Re: How we secure Monzo's banking platform

#136
post #53

Earlier quoted context omitted.

The link doesn't really clarify much for me, can you elaborate? Are you saying the GP laundered money?

I'm saying that the bank gets royally fucked if they ever tell anyone who is even suspected of money laundering anything, so as a result they simply don't tell anyone anything. Whether the GP actually did it or not isn't really relevant because banks would rather lose a customer than incur the regulator's ire.

Ah I see, thank you.

Re: How we secure Monzo's banking platform

#137

Earlier quoted context omitted.

I think this is outdated. Docker is a security boundary. There is no built-in way to get out of a Docker container just by asking by default (if you mount the socket into the container, it's trivial). How good of a boundary it is may be another story. There's some seccomp filters going on and namespacing is pretty sweet too. But an attacker can escape by exploiting the kernel, which I think most security people would…

The reason that containers are not generally considered a security boundary is that many of the namespace primitives were _not designed_ as a security layer, they aren't designed to actively reduce the privileges from the current user's context. Since most containers are started as the root user, the namespace transition inherits root's permissions even if they're later dropped. Without SELinux or seccomp restriction…

> Without SELinux or seccomp restrictions, root can still pretty much do anything to the host even inside the containers.

That's not true

        Having a capability inside a user namespace permits a process to
       perform operations (that require privilege) only on resources
       governed by that namespace.  In other words, having a capability
       in a user namespace permits a process to perform privileged
       operations on resources that are governed by (nonuser) namespaces
       owned by (associated with) the user namespace (see the next
       subsection).

       On the other hand, there are many privileged operations that
       affect resources that are not associated with any namespace type,
       for example, changing the system (i.e., calendar) time (governed
       by CAP_SYS_TIME), loading a kernel module (governed by
       CAP_SYS_MODULE), and creating a device (governed by CAP_MKNOD).
       Only a process with privileges in the initial user namespace can
       perform such operations.
> For the most part this is troublesome when parts of the kernel or host userspace code are not fully aware of the different forms of namespacing (there are still portions that just check for an effective UID of 0, without checking whether they're in a namespace for example).

Yes, like I said:

> But an attacker can escape by exploiting the kernel, which I think most security people would consider to be not particularly high effort.

> Dropping privileges to a different user still trace's it origin back to the root user on the host

It does not. Only if the process creating the container is root, which with unprivileged user namespaces is not (necessarily) the case.

> The NS_GET_OWNER_UID ioctl(2) operation can be used to discover the user ID of the owner of the namespace; see ioctl_ns(2).

"root" isn't the point anyways, it's about checking capabilities. The problem is that the Linux kernel has historically not cared about root -> kernel privesc, and containers expose more attack surface because of that. But an attacker outside of a container can still just enter a namespace (user namespaces are unprivileged) and perform the same exact privesc, so containers aren't making anything worse.

> As long as the container runtime is performing the various namespace isolation primitives starting from the root user these container bypasses are going to be a risk. There are 'rootless' versions of containers which can only use the privileges available to lower (presumably heavily restricted) user but those aren't widely used.

That's not how namespaces work. Even with 'rootless' containers your guest has CAP_SYS_ADMIN. The only difference is that the daemon that starts the container isn't privileged because user namespaces are increasingly becoming unprivileged. Rootless changes nothing, except that attacks against the daemon itself won't be an insta-privesc to root on the host, they'll only be a privesc to the user running the daemon on the host.

Anyway, let's step back.

What is a security boundary? I would say it is a mechanism by which an attacker is restricted where the attacker must exploit a vulnerability in order to get around that restriction. By that measure, containers are a boundary. Is exploitation difficult? Not necessarily, like I said, the Linux kernel has loads of attack surface. But it meets a reasonable criteria for a boundary.

As an example, chroot on its own is not a boundary because attackers can just call chroot again - this requires no vulnerability, it will never be patched, and you need another layer to prevent that. Containers have nothing like that, there is no "just let me out" syscall, you require another vulnerability.

You can read more about user namespaces here:

https://www.man7.org/linux/man-pages/man7/user_namespaces.7....

Re: How we secure Monzo's banking platform

#138
post #116

One day I would love to see what having 2.000 microservices entails. Which features each service covers. I can't think of 2.000 micro services an online bank would have.

Maybe they mean instances? That doesn't seem too crazy.

I doubt it. Micro-service is a pretty specific term.

Re: How we secure Monzo's banking platform

#139
post #116

One day I would love to see what having 2.000 microservices entails. Which features each service covers. I can't think of 2.000 micro services an online bank would have.

Maybe they mean instances? That doesn't seem too crazy.

It means services (I worked there). It works fine, all the services are very similar and tight in scope

Re: How we secure Monzo's banking platform

#140
post #89

Earlier quoted context omitted.

It’s definitely their anti money laundering (AML) detection system kicking in. However it’s clearly getting false positives and their internal AML team is getting hit with a high amount of them thus causing the delays in resolving them. This is why you don’t build your own solutions to well solved problems.

>getting false positive delays in resolving them. There should be a penalty for this. When "innocent" users are denied access to their money, those actions are much more felt by the user than the bank. That user's money is a rounding error to a bank, but to the user it is everything. An incorrectly frozen account should come with some sort of "oops we're sorry" type of something that a bank can understand: monetary r…

> There should be a penalty for this.

There are, the FCA and Financial Ombudsman hold banks to an extremely high standard and hand out fines and compensation on a regular basis. Denying access to funds is a serious issue which banks and regulators take very seriously. However there’s an acknowledgment that AML systems have false positives.

> I would rather criminals get away with a laundering transaction

Easy to say when it’s not your money that’s been stolen. Most money being laundered through retail banks like Monzo isn’t drug money, or high stakes bank heists. It’s the millions stolen every year from normal people subjected to high pressure, complex, coercive and extremely effective social engineering scams.

We’re talking about peoples house deposits (because their solicitors emails got hacked), their life savings, their retirement funds.

Don’t assume you’re immune to these scams, or that you’re paying a cost for it. The scams trick even the most savvy individuals. Costs are borne by everyone with a bank account because victims are reimbursed, and I can assure you, no bank is sacrificing their profit margin to do that.

Post reply on HN