1 00:00:02,050 --> 00:00:11,290 All right, so now what you're seeing on the screen is the setup steps for the Ferothy ransomware. 2 00:00:11,410 --> 00:00:17,090 In the first screen what you are seeing is, it's the folder with the name tools. 3 00:00:17,090 --> 00:00:19,970 That's where we have got most important files. 4 00:00:20,170 --> 00:00:25,950 So when I look at it, I've got two files in there for this proof of concept. 5 00:00:26,850 --> 00:00:32,650 One of the name is most important file and the second one being the sensitive passwords. 6 00:00:32,770 --> 00:00:37,190 So let's open one of the text files. 7 00:00:37,430 --> 00:00:46,670 Looking at the text file, it seems that there is some text in there for the demo purposes, but it's in plain text right now. 8 00:00:46,770 --> 00:00:57,870 So let's close this file and let's look at the second file, which is sensitive password files, which contains some dummy passwords in there in plain text. 9 00:00:57,870 --> 00:01:01,410 Okay, so I'm going to close these files now. 10 00:01:01,410 --> 00:01:11,370 So now you know that these are the important files on the machine, which we are going to encrypt through Ferothy. 11 00:01:11,390 --> 00:01:23,650 Okay, what I've got on the right is the C drive of the machine in which we are going to infect it with ransomware. 12 00:01:24,150 --> 00:01:29,190 And what I'm going to show here is this is the folder structure. 13 00:01:29,330 --> 00:01:37,550 And remember that right now we have configured our ransomware to encrypt files in the tools folder. 14 00:01:37,650 --> 00:01:51,290 However, this can be customized to encrypt the full folder of the complete C drive or the whole document folder or pictures or whatever you like. 15 00:01:51,450 --> 00:02:00,370 Okay, so let's keep it open and see how things are changing when you run the ransomware on the infected machine. 16 00:02:00,630 --> 00:02:17,190 The third folder I have opened here is the folder that is where all the certificates and the symmetric keys are going to get dropped and then it's going to get exfiltrated out to the attacker. 17 00:02:17,930 --> 00:02:23,190 In the fourth window, I have got browser open. 18 00:02:23,410 --> 00:02:28,070 In the first tab, I've got the Google Drive. 19 00:02:28,070 --> 00:02:33,870 Right now, if you look at this Google Drive, there is only one folder and a file. 20 00:02:33,870 --> 00:02:37,170 However, there is no other thing available here. 21 00:02:37,490 --> 00:02:47,730 So, for the exfiltration purposes, when you have big files, it's going to get exfiltrated to Google Drive. 22 00:02:47,730 --> 00:02:55,590 So, I tried it with this test MP4 file, which is 126 MB and it works perfect. 23 00:02:56,150 --> 00:03:10,030 So, what is going to happen is these files over here is going to get copied into the Google Drive when you run the ransomware. 24 00:03:10,350 --> 00:03:23,450 And remember that we have distributed our attacks infrastructure in a way that we are not relying on one service. 25 00:03:24,970 --> 00:03:31,000 So, the symmetric keys are going to come to poke mail. 26 00:03:32,130 --> 00:03:33,910 And how do you set up poke mail? 27 00:03:33,910 --> 00:03:36,350 I'm going to show you in a moment. 28 00:03:36,350 --> 00:03:46,630 But before that, let's look at what sort of USC controls we have on the infected machine. 29 00:03:46,730 --> 00:03:51,580 So, let's look at the USC settings. 30 00:03:51,580 --> 00:03:57,740 It seems that the highest level of USC is always notified. 31 00:03:58,980 --> 00:04:07,980 Whenever the app tries to install a software or make any changes to the computer, this is going to notify the user. 32 00:04:07,980 --> 00:04:11,100 So, this is currently set on always notified. 33 00:04:11,660 --> 00:04:23,400 Let's minimize this and look at the current certificate store, which is the local store on the box. 34 00:04:23,400 --> 00:04:30,420 So, the current store has got only one certificate in here. 35 00:04:30,420 --> 00:04:43,320 However, when the ransomware is going to get deployed, you will see one of the other certificates is going to get installed and then it's going to get removed afterwards. 36 00:04:43,780 --> 00:04:50,260 Once you exfiltrate and encrypt these files inside the tools folder. 37 00:04:50,480 --> 00:04:52,820 Let's minimize this now. 38 00:04:53,340 --> 00:05:02,600 So, let's set up our ransomware with the email address where you wanted to exfiltrate the keys for the certificate. 39 00:05:03,080 --> 00:05:07,760 Right now, I've chosen the Statue of Liberty as a location. 40 00:05:07,760 --> 00:05:19,880 So, I'm going to click on this and then get the geographic coordinates and I'm going to paste it in here. 41 00:05:20,080 --> 00:05:25,920 So, this geographic coordinates is for the Statue of Liberty. 42 00:05:25,980 --> 00:05:28,560 I'm going to set this as my location. 43 00:05:28,920 --> 00:05:41,900 So, once I set this as a location, you'll see that it has created a unique location for me and then it has generated a random looking email account for me. 44 00:05:42,280 --> 00:05:49,020 And then it has got one email in it as of now. 45 00:05:49,280 --> 00:06:02,580 So, you have to copy this email and then put it inside your ransomware file and have to make changes in the email address parameter. 46 00:06:02,580 --> 00:06:04,820 So, I'm going to do that now. 47 00:06:05,440 --> 00:06:17,640 So, I've modified the email address for one in here and the other place where you want to make changes is email one parameter over here. 48 00:06:17,660 --> 00:06:22,480 So, after you make those changes, save the file. 49 00:06:22,480 --> 00:06:27,920 So, I'm going to save this file and I'm going to minimize this for now. 50 00:06:27,920 --> 00:06:34,100 And I have got... I've opened a PowerShell file and I'm going to run the ransomware. 51 00:06:35,100 --> 00:06:40,960 To run the ransomware, all you need to do is just run one single PowerShell file. 52 00:06:41,280 --> 00:06:49,240 Once this is going to run, you will start seeing files going to get dropped inside the temporary folder. 53 00:06:49,540 --> 00:07:03,240 And then in Gmail Drive, you are going to see a zip encrypted file containing the exfiltrated data. 54 00:07:03,240 --> 00:07:07,020 So, I'm going to hit enter. 55 00:07:07,020 --> 00:07:10,960 So, it is going to create a B64 encoded certificate. 56 00:07:10,960 --> 00:07:13,400 This is going to be the public key. 57 00:07:13,520 --> 00:07:16,240 And then it's identifying... 58 00:07:17,860 --> 00:07:27,060 So , then it's going to install the 7-zip module onto the machine. 59 00:07:27,060 --> 00:07:32,800 However, let's see if this has already installed the certificate on the machine. 60 00:07:32,980 --> 00:07:42,060 Not as of now, but let's give it some time and then you'll see another certificate being installed in here on the machine. 61 00:07:42,360 --> 00:07:49,120 So, once that is done, it's going to start encrypting the files. 62 00:07:49,120 --> 00:07:51,920 So, right now it is zipping the files. 63 00:07:51,920 --> 00:07:55,720 So, if you look at this, it has already created the certificate. 64 00:07:55,720 --> 00:08:04,560 It is creating files and now the files are already zipped and email has been sent to an attacker on the Pokemail. 65 00:08:04,560 --> 00:08:11,740 So, if we go here and refresh it, you know, it has created the still.zip file. 66 00:08:11,740 --> 00:08:21,900 It is running some enumeration on the files on what all files the ransomware needs to encrypt. 67 00:08:22,000 --> 00:08:27,380 And then it's going to start uploading the files to the Google Drive. 68 00:08:27,380 --> 00:08:34,020 So, once it's going to upload the large files, it's going to delete it from the temporary folder. 69 00:08:35,540 --> 00:08:40,580 And then you'll see that it is going to start encrypting the files. 70 00:08:40,580 --> 00:08:50,760 If you look at here, you will see that the files have already been encrypted and we have successfully deployed ransomware onto the machine. 71 00:08:50,840 --> 00:09:06,340 So, once this is done, you know, it gives you a notification on the infected machine that, you know, they have been ransomed and the files are encrypted. 72 00:09:06,600 --> 00:09:21,920 So, you know, as of now I have put 30 seconds for the proof of concept, but then you can set this timer for, you know, however long you want, right? 73 00:09:21,920 --> 00:09:31,980 And so once this is going to be done, it's going to close the UI and then it's going to change the desktop of the infected machine. 74 00:09:31,980 --> 00:09:47,220 Right now, if you see, if you have a quick look at the folder where we had sensitive files, the files have been changed with .firoti extension. 75 00:09:47,220 --> 00:09:50,820 The file type is again changed with .firoti. 76 00:09:50,960 --> 00:10:05,060 And then once you see here, the background gets changed as well with the .firoti background. 77 00:10:05,060 --> 00:10:07,720 Okay, so that's been done as well. 78 00:10:08,080 --> 00:10:16,400 And if you look at it here, right, you have received emails containing the private key for the certificates. 79 00:10:16,400 --> 00:10:22,020 All the certificates is already deleted from the infected machine. 80 00:10:22,460 --> 00:10:37,520 And then if you try to open the tools folder again and try to access the files, you'll see that, you know, it's no longer accessible. 81 00:10:37,520 --> 00:10:46,680 If you open it, you know, there is just chunk characters in it and it's been encrypted with .firoti. 82 00:10:47,060 --> 00:10:50,560 So that's what the ransomware does. 83 00:10:51,020 --> 00:11:01,100 And so the next step is to actually go ahead and download the encryption keys. 84 00:11:01,100 --> 00:11:04,400 So I'm going to download the backup 1.zip file. 85 00:11:05,180 --> 00:11:11,320 And if I go back to inbox, I'm going to download the other file as well. 86 00:11:11,320 --> 00:11:15,460 So I'm going to copy this. 87 00:11:15,480 --> 00:11:20,340 I'm going to backup this as well. 88 00:11:22,780 --> 00:11:36,200 You know, so once downloaded, you can go to your Google Drive and you'll see that still .zip file is already in there. 89 00:11:36,200 --> 00:11:41,660 And if you try to open this, you'll see that you've got the same two files in there. 90 00:11:41,660 --> 00:11:46,000 The most important file .txt and the sensitive passwords .txt. 91 00:11:46,000 --> 00:11:57,260 These files were actually on the infected host in .txt format, which is now converted to .firoti. 92 00:11:57,480 --> 00:11:57,960 Okay. 93 00:11:57,960 --> 00:12:01,920 So if you try to open this, you won't be able to open this. 94 00:12:01,920 --> 00:12:05,240 The reason is, but however, let's download this. 95 00:12:05,760 --> 00:12:07,600 So it is scanning for wireless. 96 00:12:07,600 --> 00:12:12,500 And now once it's going to download, let's go to the download folder. 97 00:12:12,980 --> 00:12:14,580 Oh, it's not done already yet. 98 00:12:14,580 --> 00:12:20,820 So let's go to the download folder and see if we can open this. 99 00:12:20,820 --> 00:12:25,740 So if we can try to open this, it requires the password. 100 00:12:26,780 --> 00:12:34,440 And this password for these files are actually inside the poke mail, right? 101 00:12:34,440 --> 00:12:38,400 So and in the backup.zip file. 102 00:12:38,400 --> 00:12:48,920 So if you try to open the backup.zip file and look at the sys.txt file, that's the private key for the zip encrypted file, which is on the Google Drive. 103 00:12:48,920 --> 00:12:52,740 So, but however, it requires the password. 104 00:12:52,740 --> 00:13:02,500 This password is encrypted using this initialization vector over here, which is using the symmetric key, right? 105 00:13:02,500 --> 00:13:11,980 So this is the symmetric key for the very first file, which is sys.txt, right? 106 00:13:11,980 --> 00:13:18,540 So this initialization vector as an attacker, you are the only one who holds this. 107 00:13:19,100 --> 00:13:28,840 And since this is running inside the memory, and as you rotate your infrastructure, no one else would be able to gain access to this. 108 00:13:28,900 --> 00:13:34,020 So let's verify and put this as a password in there. 109 00:13:34,020 --> 00:13:42,480 And sure enough, this is the the password for the stolen file, right? 110 00:13:42,480 --> 00:13:48,920 So this is the password for the, sorry, certificates using which the files have been encrypted. 111 00:13:48,920 --> 00:13:55,540 So when you want to send this decryption key, this is what you're going to send it to the user. 112 00:13:55,740 --> 00:14:00,440 Okay, so that's how the attack works. 113 00:14:01,240 --> 00:14:13,460 And if you look at it, there is going to be a firoti.txt file on the desktop, such as this. 114 00:14:13,460 --> 00:14:20,380 And if you try to open it, it's going to give you the same note, which you saw it in your pop-up window, right? 115 00:14:20,380 --> 00:14:25,360 That your files have been encrypted, they're asking for 0.10 Bitcoin. 116 00:14:25,860 --> 00:14:33,740 If you don't pay it, they are going to, you know, release your files, sensitive files to the internet. 117 00:14:34,060 --> 00:14:41,100 So the same can be done with the phishing emails, right? 118 00:14:41,100 --> 00:14:51,900 So if we go to, let's go to Gmail and see how this attack can be done via phishing emails. 119 00:14:51,900 --> 00:14:57,720 So one thing I'm going to show you here is how do you bypass antivirus? 120 00:14:57,720 --> 00:15:00,380 Because that's not the scope of the project. 121 00:15:00,660 --> 00:15:16,880 We are purely looking at the ransomware and how you can create a proof of concept and make your incident response team work for it to see their behavior and identify the gaps, right? 122 00:15:16,880 --> 00:15:24,820 So supposing you receive emails like this with a subject line, important promotion list for 2020, right? 123 00:15:25,000 --> 00:15:28,000 And supposing you receive this from your 124 00:15:32,120 --> 00:15:38,120 colleague whose email is compromised using various other means. 125 00:15:38,120 --> 00:15:48,260 And since you trust that your colleague and internal email addresses, you think this is an important file to work with, okay? 126 00:15:48,260 --> 00:15:54,280 So once downloaded, the files look like this, okay? 127 00:15:54,280 --> 00:15:56,360 And this looks very legit. 128 00:15:56,360 --> 00:16:10,400 An attacker can generate this kind of data and use someone to, you know, download files and run it, okay? 129 00:16:10,400 --> 00:16:16,650 So once you have downloaded this, there is a note here saying that click on the chart to display the insights. 130 00:16:17,040 --> 00:16:20,860 Suddenly you'll see that, you know, the data is good. 131 00:16:20,860 --> 00:16:26,200 However, the issue is the chart is not getting loaded properly. 132 00:16:26,200 --> 00:16:32,880 So let's look at the macros and what an attacker has done in here. 133 00:16:33,860 --> 00:16:37,000 So the macro looks like this, okay? 134 00:16:37,000 --> 00:16:45,120 So it's going to download the test.patch file from the GitHub and then it's going to run the demo.patch file. 135 00:16:45,120 --> 00:16:51,100 It's going to save it in the temporary folder and then it's going to run it, okay? 136 00:16:51,100 --> 00:16:59,880 So let's see what's in the GitHub and how it's going to pull this stuff. 137 00:16:59,880 --> 00:17:02,140 So right now I'm in the test.patch file. 138 00:17:02,140 --> 00:17:04,440 This is what it is getting pulled. 139 00:17:04,740 --> 00:17:13,440 So once things are getting pulled, it's going to run a ransomware which can be downloaded on the machine itself, right? 140 00:17:13,440 --> 00:17:15,980 Like the way we are downloading this patch file. 141 00:17:16,360 --> 00:17:24,560 So let's try to run this and see if it is actually working. 142 00:17:24,740 --> 00:17:28,940 So since it says that, you know, click on the chart to display the insight. 143 00:17:28,940 --> 00:17:36,080 And what I've done is on click event for this chart is going to call the macro and it's going to run it. 144 00:17:36,080 --> 00:17:39,180 So let's see if this is working. 145 00:17:39,180 --> 00:17:59,980 So once I click on this, right, it has open.cmd and it's going to pull the file from the internet into the temporary directory of this machine. 146 00:17:59,980 --> 00:18:06,320 So let's go to tmp directory and the demo file has already been downloaded, okay? 147 00:18:06,320 --> 00:18:12,920 So if you look at the timing, it's 11.16 and just now the file has been downloaded. 148 00:18:12,920 --> 00:18:15,900 It is creating the sys.txt file. 149 00:18:16,240 --> 00:18:18,940 The ransomware is running in the background. 150 00:18:18,940 --> 00:18:25,660 You can confirm this by the way this CMD has opened. 151 00:18:25,660 --> 00:18:31,940 But if you don't want the CMD file to pop up, you can hide that as well. 152 00:18:32,700 --> 00:18:35,620 See, it is creating different files. 153 00:18:35,620 --> 00:18:42,460 It has created backup.zip file and it's going to perform the same attack again. 154 00:18:43,340 --> 00:18:57,280 And what it's going to do this time, it's going to repeat exactly the same steps on the machine but without even a user realizing that something is happening on the account, right? 155 00:18:57,280 --> 00:19:00,980 So if you see that still.zip file has already been created. 156 00:19:02,600 --> 00:19:04,780 A zip file has been created. 157 00:19:04,780 --> 00:19:10,640 Let's see if there is actually the certificate created on the machine. 158 00:19:10,640 --> 00:19:14,900 Yes, cert.csscer has been created just now. 159 00:19:15,040 --> 00:19:24,560 But you can verify the same stuff by actually downloading, by looking at the personal certificate store. 160 00:19:24,560 --> 00:19:36,380 So this store, it is going to create a self-signed certificate on the user machine even though we have a USC of always notify, right? 161 00:19:36,380 --> 00:19:46,960 So if you double-click on the certificate, you know that we have got a private key which is getting sent to an attacker via poke mail, okay? 162 00:19:46,960 --> 00:20:08,620 So once the attack is going to be successful, it's going to delete this self-signed certificate and the private key from the machine and then the user won't have a chance to encrypt their files, okay? 163 00:20:08,620 --> 00:20:14,820 So that's how the attack vector works even with the phishing. 164 00:20:15,800 --> 00:20:24,300 And let's go to our... oh, so the attack has already been finished. 165 00:20:24,300 --> 00:20:31,680 It is refreshing the window and that's why the windows got closed. 166 00:20:32,340 --> 00:20:42,200 And then when you... you can confirm this by going into the same tools folder and see if the files are encrypted already. 167 00:20:42,200 --> 00:20:51,180 So the files are encrypted and then the certificate is going to get deleted. 168 00:20:51,180 --> 00:21:00,880 So if you keep refreshing it, if you refresh it, the certificate is already deleted and that's how the attack works through phishing. 169 00:21:00,880 --> 00:21:05,180 And that's how the ransomware gets sprayed from one machine to the other. 170 00:21:05,340 --> 00:21:12,880 I hope you like this demo and you have learned something new out of it. 171 00:21:15,200 --> 00:21:21,700 So let's jump back to the presentation and see some mitigation strategies now. 172 00:21:21,700 --> 00:21:22,520 Now...