A (17:30)
Yeah, that's a good point. I think from a hardening perspective, there are a couple of group policies that you can enable on a Windows system that would disable the things like resource redirection to ever happen on a victim machine. And a lot of those times these policies are kind of not configured by default. And so you would have to explicitly go in there and configure them to say that do not allow something like drive redirection. You can go quite granular as to what type of resource you would like to prevent redirection of. Right. And if you know in your organization that's not something that you, that you would normally use, maybe your IT support team, which would normally be the team that would use these kind of functionalities, they are not, they have that they have other tools that they would leverage to do this kind of remote support, and you don't really need to have this enabled via rdp, then it would be great to kind of just go in and disable that. So even if you were targeted, you can't have this attack execute because it's disabled by policy. I think on the resource redirection Side that's something that can happen on the remote application side and just the remote connection side, the RDP connection side. One thing which I think was interesting as part of this attack, and then I'm going to come to the defensive side of it is these.rdp files were signed using a certificate that was also used for the domain that the connection was then made to. And why an attacker would sign these RDP files is so that normally when you, when you try to open up a RDP connection and it's an unsigned kind of connection, you get this little warning box on the top that says that, you know, this, this, this could be an untrusted connection or we don't fully trust the, the publisher of this, of this file. And that shows up as a yellow warning box by default. Windows, right. One would one in this case the file was signed largely to prevent that pop up for come from, from showing. And so it just looked like a regular run this application kind of, kind of pop up box, which is what I assume the adversary would would want because they were saying that this is just an application. That's how their lure was working. Right. And so to make it less suspicious, the sim the file was signed and it was signed with the certificate that was used for the domain that this connection then went to, which is slightly interesting and not so common behavior. And one way that you can combat this is again within the group policies. There are certain policies which are again listed in the blog that allows or disallows.rdp files being run from unknown publishers. Right. So ideally what you could do is that you could turn on that policy and say you can run a dot RDP file in my environment, but only if it's signed by a certificate that we know about. And there are two distinct policies that can allow that. One of them that says don't run unknown publishers and then another one that you can configure as to what are your known publishers. So then the next time say you don't know in your organization if you're ever going to use RDP files, you don't want to disable it altogether. But you do know that if we use it, we're going to use it from certificates that belong to organization, you can configure the group policy to say that these are the certificate authorities that my organization trusts. Do not run any other RDP files that aren't signed with exactly this publisher. So that's one way we can combat this. And then we already spoke about the resource redirection part so that's more on the policy side of things. In general, if you feel like dot RDP files are not something that your organization would ever use, let alone send over email, it might be worthwhile considering disabling RDP file as an extension type at all within emails. So that's something else that's more on the hardening side. One of the kind of hunting techniques that we advocated for within the blog was normally if this delivery method of RDP files is via emails, you get an email, it has an attachment in it. Normally you would just double click the attachment and run it. When you double click attachments on emails, they get stored in particular known almost temporary folders within a machine, a Windows machine, and you can actually look for dot RDP files within those directories. And that's kind of like a retroactive thing. If you know that or you suspect you could have been targeted by this campaign, that could be an interesting thing to look for, kind of retroactively hunt for. Because normally those folders also get cleared out over time because they are kind of temporary folders. You're not explicitly saving the attachment on your system, but you're just running it directly from an email. So those regexes provided some patterns that you can kind of retroactively hunt through to find that, hey, someone executed this.rdb file directly from their email and then kind of look into it from there. Again, if that is something that's, that's something that's, that's not common within your environment. I think on the other side, on a more from a detection perspective, normally when an RDP connection happens, there are a bunch of files that get written onto the victim system. So right now I'm just focusing on what happens in an environment that we control. So we don't control the attacker's machine, but we do have some visibility over a victim machine. And I like to focus on what happens on that system that could indicate that such a technique or such trade off had occurred on the system. One of them is that you can look for file creation events that spawn from the MSDSC binary, which is related to the Microsoft RDP protocol. And unfortunately that kind of activity, file rights that originate from that process, is not super uncommon because during the regular, even a completely benign connection of rdp, which could be normal in an environment, there's a bunch of files that get written in a few locations, file locations that we've mentioned in the blog. But if you know what those files are, as well as what pattern they normally naming pattern, they go with and which location they happen in. If you could look for file creation events that excluded those, you could potentially find evidence of manual writing of files onto the system. So like we mentioned before, Luke, if we were covering that scenario where an attacker places a file on your system and then via the remote app coaxes you to run it, you could potentially find that using, using a detection like this. So the only hard part is you got to get away from all the regular benign noise that this kind of activity displays. So those are a few ways I think that we can battle this kind of technique. Aside from, I think the blog has a couple of Yara rules that is focused on looking for dot RDP files or RDP configuration files that allow for remote app execution, that allow for resource redirection, that are signed by. In this case, a let's encrypt certificate was used. So that's another detection that we've gotten there. So we've got a combination of things that you can use to retroactively hunt for this activity, things that you can use to harden your environment against future such activities. And yeah, also things to look for in the future when we want to detect this kind of activity.