Zero-Day Exploitation of Atlassian Confluence
volexity.com
volexity.com
https://confluence.atlassian.com/doc/confluence-security-adv... https://twitter.com/USCERT_gov/status/1532511428451631108?t=...
Posting this high here so it can be seen.
https://gist.github.com/noahbailey/0260efa836b4ea67163cbfeef...
See https://confluence.atlassian.com/doc/confluence-security-adv...
It is strange that they didn't have mitigation steps earlier, but I'm guessing Atlassian announced this immediately since it was already being exploited.
location ~\* \$\{. {
deny all;
}
but this only helps if this vulnerability is triggered using the request uri otherwise it's useless RewriteEngine On
RewriteCond %{REQUEST_URI} ^.*\${.*$
RewriteRule ^/(.*) https://google.com [R=302,L]
seems to work ... http-request deny if { path -m sub ${ }
http-request deny if { query -m sub ${ }
http-request deny if { path -m sub $%7B }
http-request deny if { query -m sub $%7B }
http-request deny if { path -m sub %24%7B }
http-request deny if { query -m sub %24%7B }The ONLY correct solution here is to bring the servers offline until there is a patched version to upgrade to. Anything else would be a terrible idea.
_sometimes_ there is only one config setting that's affected, or some other often lesser-used feature that can be disabled. But it highly depends on the method used.
Best of luck in navigating this, it's a very fine line.
(For the record, Cloudflare, Stripe and a limited set of other companies are in my opinion some of the few that 'made it big' and that didn't turn into disasters or abusers of their position, in contrast with Google, Microsoft, Apple, Facebook and many many others)
I don't think the Internet was envisioned as a cyber war zone.
It was seen as a communications tool during a war, not as the battleground itself...
I call it BS, i made many many emailservers, and my customers have no problem's with sending to gmail/hotmail etc.
Or maybe it's really just luck for the +50 Email-Servers, who knows right?
I usually try and make this so, but it is often very hard to impossible. Vendors do not make it easy.
See "Figure 1. Process tree in Volexity Volcano Server from the infected Confluence server"
https://www.volexity.com/wp-content/uploads/2022/06/Figure1....
I didn't mean running as non-root would fix the problem, just that a remote root RCE was worse than a normal RCE.
I thought Atlassian products were well trusted. Is that not the case?
https://confluence.atlassian.com/doc/confluence-security-adv...
Each time, they patch the particular vulnerable script, but they don't seem to have done anything systematic which would eliminate the entire class of vulnerabilities (like, say, adding taint-checking for unquoted, client-supplied content before running code as an OGNL script). So they keep coming up.
Let's also admit that setting up iptables is harder than it needs to be. I mean, not after the first twenty times... you eventually remember all the arcane logic and expect everyone else to as well.
Most people don't know that you can have systemd bind to the privileged ports for you, and hand over the fd to the port to your (unprivileged) process.
Same goes for docker/containerd btw, if you run docker as root nowadays, you are doing it wrong.
[1] https://www.freedesktop.org/software/systemd/man/systemd.soc... [2] https://www.freedesktop.org/software/systemd/man/systemd-soc...
https://www.zdnet.com/article/equifax-confirms-apache-struts...
This often doesn't apply in cryptography; where adding two separate functions may result in a system that is actually weaker to attack.
This only applies to apps for internal use like Confluence or Jenkins, not publically accessible websites.
Now, if the attacker has access to the proxy authentication, all of this doesn’t help much, but at least you could track and limit who can access what chunks.
I have other proxies which require OIDC authentication before passing any packets on
Now sure, I'm still vulnerable to internal attackers from my company, but that's an audited trail to a real specific user, not just a random botnet on the internet.
An unauthenticated attacker can no longer simply rely on a vulnerability in the application or underlying framework, but must first obtain an employee's credentials, or find another vulnerability in the proxy or authentication infrastructure.
This isn't a false sense of security. It is a concrete additional layer of security which has tangible benefits.
The real problem is if there only one wedge, you need to combine that strategy with multiple layers of security to get anywhere, otherwise the first hole is the last.
Possibly just some nginx features I'm not familiar with, or are there whole apps out there that serve to be nothing other than an authentication layer inside of a webserver? Are they popular?
Google IAP is a big one, and Cloudflare Access can let you do similar things (link an internal service to Cloudflare network and Cloudflare will deny someone ability to talk to that service until they've validated their identity to cloudflare and it matches your rules somehow.
Nothing from Atlassian should ever be exposed to the public internet. Atlassian stuff is a security tire-fire with very old dependencies even in the latest releases, a painful reinstall/config merge needed for even minor patches, and no auto-update mechanism.
We will continue to update our advisory (https://confluence.atlassian.com/doc/confluence-security-adv...) at least every 24 hours as additional details become available - including a download link to the software updates as soon as they are available.
https://confluence.atlassian.com/doc/confluence-security-adv...
"If you are unable to take the above actions implementing a WAF (Web Application Firewall) rule which blocks URLs containing ${ may reduce your risk."
Smells like log4j issues?
Edit: Ah, template injection, see below.
https://portswigger.net/research/server-side-template-inject...
Given how much they’re pushing the hosted offering.
> If your Confluence site is accessed via an atlassian.net domain, it is hosted by Atlassian and is not vulnerable. Our investigations have not found any evidence of exploitation of Atlassian Cloud
Must be a relief for Atlassian after the recent long outage that only impacted cloud instances.
It probably is.
I raised the alarm for log4shell internally on December 9th, and then then it was being actively exploited. I know people at other companies who hadn't heard about it, or didn't think it was worth doing anything about, as recently as April.
I don't know Confluence though, so I cannot say how more or less polished XWiki is compared to Confluence.
Anyway, don't hesitate to reach the XWiki community (there's a public forum and a public matrix channel, come say hello!) or XWiki SAS if you have questions or concerns, they'll be happy to answer and you can see whether XWiki would be a good fit for you :-)
https://confluence.atlassian.com/doc/confluence-security-adv...
Running applications under SecurityManager would have prevented a lot of these vulnerabilities (or rather - their severity would be much lower).
No (with proper policy in place). That's the whole point of SecurityManager. Even if you can execute code - it is sandboxed and has limited (or none at all) permissions.
2) presumably for the same reason they ran confluence as root: no idea what they're doing (forgivable) or lazy (unforgivable)
It doesn't really help you to use a security product in front of your vulnerable product when the security product turns out to be roughly equally vulnerable.