1 00:00:00,000 --> 00:00:02,280 Okay, let's get started on the next session. 2 00:00:02,280 --> 00:00:09,140 I've got Jamie Sanchez with derevolutionizing OS fingerprinting, the cat and mouse game. 3 00:00:09,140 --> 00:00:17,980 Jamie's got over 20 years experience as a specialist advisor for large national and international companies , focusing on different aspects of security. 4 00:00:17,980 --> 00:00:20,260 And without further ado, I'll hand over to Jamie. 5 00:00:20,260 --> 00:00:21,400 Thanks very much . 6 00:00:25,980 --> 00:00:27,740 Well , hi, hello. 7 00:00:27,960 --> 00:00:29,560 It's great to be here. 8 00:00:29,560 --> 00:00:32,860 Thank you for coming to see this talk. 9 00:00:33,880 --> 00:00:36,120 Just some things about me. 10 00:00:37,100 --> 00:00:40,360 I've been working in security for almost 20 years. 11 00:00:40,360 --> 00:00:43,160 It's not my first time in Vegas. 12 00:00:43,700 --> 00:00:46,540 So it's great to be here again. 13 00:00:47,480 --> 00:01:12,540 What we are going to talk about is OS fingerprinting, you know, that is something very interesting from different perspectives, you know, from the attacker point of view, for defenders, administrators, vendors, you know, you really need to know what kind of operating system you are trying to connect. 14 00:01:12,540 --> 00:01:24,820 If you try to attack, you need to know, for example, if it's a Windows XP without a service pack or whatever before launching your exploit, you have to know the memory addresses. 15 00:01:24,820 --> 00:01:38,420 So it's described as basic collection of configuration attributes from remote devices but it's not also this because there are a lot of approaches for operating system fingerprinting. 16 00:01:38,420 --> 00:01:45,500 You know the old days when everything was like banner grabbing, that's manual recognizance. 17 00:01:45,500 --> 00:01:52,980 Then we moved to active operating system fingerprinting with tools like Xboot, like Nmap. 18 00:01:52,980 --> 00:02:02,020 Then we have also that basic point of view where you are only an analyzer like a packet sniffer. 19 00:02:02,020 --> 00:02:11,180 All the traffic that you are generating on your side and on the other side just to get useful information. 20 00:02:11,220 --> 00:02:13,560 But there is another approach that are the timing attacks. 21 00:02:13,560 --> 00:02:15,800 We are not going to see it here. 22 00:02:17,060 --> 00:02:21,160 So the first technique is banner grabbing is very simple. 23 00:02:21,160 --> 00:02:32,080 You connect, you use Telnet for example to a web server to get all the headers information if you are dealing with an ESS or NGINX, whatever. 24 00:02:32,100 --> 00:02:36,000 You can also connect to FTP services, Telnet to see the banner. 25 00:02:36,000 --> 00:02:38,060 You can use SNMP. 26 00:02:38,200 --> 00:02:41,560 That's kind of active techniques. 27 00:02:42,760 --> 00:02:49,520 But you can also get free information for other services, you know, Emap, Finger, NTP. 28 00:02:49,620 --> 00:03:09,160 And if you have access to the remote machines, you can also play with some configuration files for the issue files, the banners and you can try to port a scan and also you can try to do social engineering just to get information about the technologies used by any company. 29 00:03:10,780 --> 00:03:25,680 There are a lot of services that gives any other information, for example FTP use the SST command that asks information about the server operating systems and you have some examples there. 30 00:03:26,760 --> 00:03:41,240 Another useful thing would be for example in FTP connecting to the FTP, get any file that is inside, for example the LS, compress, cut and try to get information on your local machine. 31 00:03:41,240 --> 00:03:48,700 For example here you can see that our file is compiled for Linux, for Sun, whatever. 32 00:03:49,520 --> 00:04:01,520 You can also use all the kind of search engines like Sodan, like Census, that get all this information for you so that you don't have to interact with the other machine. 33 00:04:02,920 --> 00:04:09,460 For example, this is very useful because I don't know if you can see it there. 34 00:04:15,240 --> 00:04:16,220 Well, don't worry. 35 00:04:16,260 --> 00:04:30,960 If you try to scan, for example, mobile networks, you can try to look for ports 62078 as well for jailbroken iPhones and you can try to connect with SSH with the file credential that are root and alpine and try to move on. 36 00:04:30,960 --> 00:04:33,960 So this is very important to know. 37 00:04:33,960 --> 00:04:36,560 To know what kind of operating system you are dealing with. 38 00:04:36,560 --> 00:04:43,840 In this case I only use the mobile phones to jump to another machine and finally attack my target. 39 00:04:43,840 --> 00:04:50,040 Try to get all the information and try finally to attack my final target. 40 00:04:50,300 --> 00:04:54,440 So some things you need to know, TCP IP theory. 41 00:04:54,680 --> 00:05:03,020 This should be very basic but it's something that people have to understand before going into fingerprinting. 42 00:05:04,580 --> 00:05:16,280 For example, in IP you have to know what kind of protocol you are dealing with, TCP, UDP, ICMP, that are the most important ones that we are taking a look. 43 00:05:16,900 --> 00:05:19,380 Source address, destination address, something you know. 44 00:05:19,380 --> 00:05:26,360 But in TCP we will be dealing with SIM packets, ARC packets, push. 45 00:05:26,360 --> 00:05:31,860 We have to know not every, almost every TCP option that is available. 46 00:05:31,860 --> 00:05:46,040 But you have to understand that every almost operating system uses some TCP options in the same order and maybe in Windows XP and Windows 2000 they have the same options but they are in different order. 47 00:05:46,040 --> 00:05:52,760 So that's the way that we can make the difference and know what we are dealing with a Windows XP or Windows 2000. 48 00:05:53,380 --> 00:05:55,960 The same for UDP. 49 00:05:56,540 --> 00:05:59,420 Just to know source port, destination port. 50 00:05:59,420 --> 00:06:06,760 You will see that in Nmap it has like a custom data that has a lot of C's. 51 00:06:07,240 --> 00:06:12,580 And finally ICMP that is used by Nmap. 52 00:06:12,580 --> 00:06:17,220 So these are some basics that you will see that in any database. 53 00:06:17,220 --> 00:06:23,680 You get all this information if there is a congestion flag that is on. 54 00:06:24,300 --> 00:06:28,220 If the default fragment flag is on. 55 00:06:28,220 --> 00:06:38,820 So for active operating system fingerprinting we are going to see just little tools that for example some of the first one that was called Queso. 56 00:06:38,820 --> 00:06:40,280 That is in Spanish. 57 00:06:41,200 --> 00:06:43,480 It's like which operating system. 58 00:06:43,700 --> 00:06:48,060 And it was sending like seven kind of tests. 59 00:06:48,060 --> 00:06:53,280 You can see the SYN, SYN plus acknowledge, SYN. 60 00:06:53,440 --> 00:07:00,760 And then they moved and another project was released that called XProof. 61 00:07:00,760 --> 00:07:06,240 XProof deal a lot of, deal with a lot of packets of ICMP. 62 00:07:06,940 --> 00:07:09,380 Send also UDP packets. 63 00:07:09,380 --> 00:07:20,380 But this kind of tools are some old right now and I think that almost everyone in the security is using Nmap. 64 00:07:20,760 --> 00:07:24,080 Nmap is a mask for pen tester for everyone. 65 00:07:24,080 --> 00:07:28,410 And Nmap gives you a lot of information about what kind of device you are dealing with. 66 00:07:28,410 --> 00:07:45,750 For example the device type in this case is a general proposed because it's a computer but it can also tell you if you are dealing with a printer, if you are dealing with a firewall, with a router or if it doesn't know well it can give you information about this maybe should be a router or maybe it's a firewall. 67 00:07:46,130 --> 00:07:51,530 Next thing that we'll tell you is the family in this case is Linux and the generation. 68 00:07:51,530 --> 00:07:55,570 The generation is practically the version that you are running. 69 00:07:57,130 --> 00:08:00,590 Common platform enumeration, that's something standard. 70 00:08:01,570 --> 00:08:03,990 The details on the fingerprint. 71 00:08:04,730 --> 00:08:14,990 If it's not a perfect match because there are some times where you have like a firewall or you are not getting all the traffic, you can get a message like just guessing. 72 00:08:14,990 --> 00:08:20,510 So Nmap doesn't know exactly what kind of operating system it is but maybe it's telling you that you are dealing with a Solaris. 73 00:08:20,510 --> 00:08:23,070 Maybe this version, maybe another one. 74 00:08:24,150 --> 00:08:33,510 You know, a lot of information, the network distance like if you were doing a trace route, uptime guess, TCP sequence prediction. 75 00:08:35,130 --> 00:08:38,410 But you can also use version scan. 76 00:08:38,410 --> 00:08:50,490 Version scan is very useful when you are dealing with a proxy because if you try to make the operating system fingerprinting you are dealing really with the proxy and you need to get information about the remote host. 77 00:08:50,490 --> 00:09:03,270 So in this case you can get a lot of information about if it's an SSL service, if it's running TCP in UDP, it can deal with a map, whatever service. 78 00:09:03,830 --> 00:09:08,610 But the interesting thing here is how does Nmap works? 79 00:09:08,610 --> 00:09:09,830 How does it really works? 80 00:09:09,830 --> 00:09:17,910 The new working for this is that Nmap is leaving 15 TCP proofs to UDP and ICMP. 81 00:09:18,510 --> 00:09:23,030 All these tests are with a custom destination port. 82 00:09:23,030 --> 00:09:24,730 They have custom flags. 83 00:09:25,470 --> 00:09:29,030 And the result for the Nmap database is something like that. 84 00:09:29,030 --> 00:09:31,490 I don't know if you can see it very fine. 85 00:09:31,490 --> 00:09:38,030 But you can find it in the slides that you have a lot of information about every operating system that you are dealing. 86 00:09:38,030 --> 00:09:42,370 For example, the first TCP proofs. 87 00:09:42,370 --> 00:09:46,150 So it has like this custom TCP options. 88 00:09:46,150 --> 00:09:53,810 If you want to get more information about this, it's really useful to get the official Nmap book. 89 00:09:53,810 --> 00:09:56,190 It has a lot of information about this. 90 00:09:56,370 --> 00:10:13,010 So you can get all the TCP options that they are using, the port, the remote port they are using, if they are looking for a network congestion flag, if the default fragment bit is set on ICMP. 91 00:10:14,570 --> 00:10:20,310 And it begins with the real proofs of T1, T2 to T7. 92 00:10:20,310 --> 00:10:28,630 When you have a lot of, a lot of flags that you will know that you will receive. 93 00:10:28,630 --> 00:10:32,630 For example, packet T2 is no flags. 94 00:10:32,910 --> 00:10:34,590 Fragment bit is on. 95 00:10:34,590 --> 00:10:36,790 It's window size is 124. 96 00:10:36,790 --> 00:10:38,950 This is all the information I got. 97 00:10:39,070 --> 00:10:49,490 So I can know which packets I should filter and I should manipulate and let all the traffic go to the, all the traffic go to my machine. 98 00:10:49,490 --> 00:10:56,230 So I, in this case, we will see a tool that is called OSFiller that is only dealing with the specific packets for Nmap. 99 00:10:56,230 --> 00:11:01,290 All the other traffic should be treated by the kernel. 100 00:11:04,130 --> 00:11:05,310 This case is UDP. 101 00:11:05,310 --> 00:11:11,470 UDP has a special payload because it has like 300 times the letter C. 102 00:11:11,470 --> 00:11:16,290 So it's very easy to, to recognize that kind of, of packets. 103 00:11:16,570 --> 00:11:23,990 I have a small demo but I think it will be better if we do it live because we can make the screen bigger. 104 00:11:24,630 --> 00:11:28,310 So the same thing is for basic operating system fingerprinting. 105 00:11:28,770 --> 00:11:31,830 You know, it's like dealing with a packet sniffer. 106 00:11:31,870 --> 00:11:36,450 What you are trying to do is coping the data without modifying it. 107 00:11:36,450 --> 00:11:37,790 You don't manipulate the traffic. 108 00:11:37,790 --> 00:11:43,990 You just get all the information and try to analyze it locally to get all the information you can about the remote host. 109 00:11:44,350 --> 00:11:55,350 And for this you got, for example, OSFiller, the tool I'm presenting, can hold all the information from the database from version 2. 110 00:11:55,350 --> 00:11:56,030 It's very simple. 111 00:11:56,030 --> 00:11:57,290 Every line is like this. 112 00:11:57,290 --> 00:12:01,810 The first is the window size for the, for the TCP IP stack. 113 00:12:01,810 --> 00:12:05,890 Time to leave if the default fragment flag is on. 114 00:12:05,890 --> 00:12:08,190 The TCP options and the order. 115 00:12:08,350 --> 00:12:19,770 And some quirks, for example, if you get a SIM packet, you shouldn't have any payload inside but there are some operating systems that send this kind of information so this is very useful to identify them. 116 00:12:19,770 --> 00:12:24,210 And finally you got the, like, like the label for the operating system. 117 00:12:24,210 --> 00:12:34,130 This is fully working but then both move to another version, version 3, that is like a complete rewrite of the, of the original code. 118 00:12:34,130 --> 00:12:45,290 And it deals with TCP packets, the SIM packets, but the, the SIM and the acknowledged packets, HTTP request, so it's more complete. 119 00:12:45,290 --> 00:12:56,690 In this case, instead of rebuilding all OSFiller, what I'm trying to do is just to migrate this kind of database to the old format so we can, we can use it. 120 00:12:56,690 --> 00:12:59,890 If you can see, it's almost the same kind of information. 121 00:12:59,970 --> 00:13:11,390 You have the time to leave, the length of the packet, maximum segment size, you have the TCP options, default fragment, some more quirks that are available in, on this operating system. 122 00:13:11,390 --> 00:13:14,150 So this is very easy to, to identify. 123 00:13:14,910 --> 00:13:19,470 And finally, there are a lot of people that are still using Ethercap. 124 00:13:19,590 --> 00:13:22,590 Ethercap is almost using the same technique as both. 125 00:13:23,370 --> 00:13:27,010 It's only copying all the traffic and just trying to analyze. 126 00:13:27,010 --> 00:13:29,230 And it has some, uh, database. 127 00:13:29,230 --> 00:13:40,230 If you can see all, practically all the, all the, all these tools use the same format, all the same information, it analyzes TCP options, length of the packet, what kind of information if it has a payload. 128 00:13:40,850 --> 00:13:49,470 So in this case, um, in the next release of OSFiller, I will migrate the same database from Ethercap to both. 129 00:13:49,470 --> 00:14:00,330 It's very simple because, uh, the version two of, of database, um, database of, of, of version two, uh, is being parsed by OSFiller and it is 100% complete. 130 00:14:00,330 --> 00:14:01,810 So it works like a charm. 131 00:14:01,810 --> 00:14:04,670 So I will be doing this, this change. 132 00:14:04,670 --> 00:14:15,370 But also there are some commercial engines like Surefire or Fireside that use this kind of techniques to, to identify all the traffic for, for the IPS or the IDS. 133 00:14:15,370 --> 00:14:22,810 When you get an alert, they tell you like, hey, you have been attacked by this kind of machine, maybe it's a Linux, maybe it's a Windows machine. 134 00:14:22,810 --> 00:14:31,770 They are using almost the same information and the same information, you can, you can spoof the, that kind of, of, of fingerprint. 135 00:14:31,790 --> 00:14:34,810 So you can try to confuse administrators, defenders. 136 00:14:35,770 --> 00:14:48,350 And this is really useful to know because there are other online services, for example, for vendors of, for ads or whatever, that use this online. 137 00:14:48,350 --> 00:15:00,610 So it's very useful for, for vendors, for example, to know if you are using not only, uh, Chrome or Safari, but if you are using, uh, Macintosh, you are using Windows, you are using Solaris, whatever. 138 00:15:00,950 --> 00:15:09,690 So in this case, it's very simple to make the same thing in, in the, in the first approach, it thinks it's a Linux version three. 139 00:15:09,690 --> 00:15:15,310 And in the second one, we are running only OSFiller and you get like Windows NT kernel. 140 00:15:15,570 --> 00:15:19,770 So that's because it's using same database like both of the gap. 141 00:15:19,930 --> 00:15:22,630 So it's very simple to deal with this. 142 00:15:23,310 --> 00:15:31,650 So other techniques to, to do this kind of fingerprinting could be analyzing the, the DHCP requests. 143 00:15:32,350 --> 00:15:40,990 So when you, when you ask, for example, for options like the DNS server, default gateway , it's asking in an, an exact order. 144 00:15:40,990 --> 00:15:43,530 So you can try to do, there is a tool called Satori. 145 00:15:43,530 --> 00:15:47,890 There is a very interesting, uh, white paper that you can download and take a look . 146 00:15:48,370 --> 00:15:57,610 And at last you can use other techniques like identify the MAC addresses, for example, Apple or Sony use some kind of patterns . 147 00:15:57,610 --> 00:16:02,410 So you can use that to get all the information about the , the machine you want. 148 00:16:02,410 --> 00:16:13,810 So at this point we know how to do that kind of active fingerprinting, basic fingerprinting, but which kind of countermeasures do we have to protect from this? 149 00:16:14,890 --> 00:16:21,430 I have collected some information about uh, just uh, someone's, for example, IP personality. 150 00:16:21,450 --> 00:16:32,070 It was very famous because, um, depending on some parameters, it let you change sequence number, window size, IDs, uh, how it answer to TCP packets. 151 00:16:32,070 --> 00:16:39,850 But the problem is that, uh, it changed a lot of, of, of the behavior of the TCP IP stack for Linux. 152 00:16:39,850 --> 00:16:43,190 And this, uh, was working for all releases of the kernel. 153 00:16:43,190 --> 00:16:46,050 So nowadays it's not very useful. 154 00:16:46,590 --> 00:16:55,530 Uh, the other one was the steal patch, uh, that was running from kernel to 22 to 24. 155 00:16:55,530 --> 00:17:12,010 But this problem, this, this tool have a problem that, um, if you change some parameters when it's scanning, you can know that this, this, the, the remote machine is using this tool and you can identify because you know that steal patch only works for some kernels. 156 00:17:12,010 --> 00:17:14,550 So it makes easier to understand. 157 00:17:15,390 --> 00:17:29,170 Many others, it was a blue, black hole, fingerprint fucker, more, there were a lot of tools, but nowadays I, I didn't find any useful tool to, to avoid this. 158 00:17:29,170 --> 00:17:31,670 So when I was working, I worked for Telefonica. 159 00:17:32,010 --> 00:17:40,130 When I was working at the security center, I have to deal with a customer that it was scanning all his network every day, every day. 160 00:17:40,130 --> 00:17:42,190 I, I didn't have time enough. 161 00:17:42,190 --> 00:17:47,090 I didn't have alerts so fast to notice him that I know that he was scanning. 162 00:17:47,090 --> 00:17:55,130 So I tried to make some kind of cool thing that this was detecting the, the scannings, uh, uh, with a program I made in Perl. 163 00:17:55,310 --> 00:17:58,190 Um, but also try to fool him. 164 00:17:58,190 --> 00:18:01,930 And so like, Hey, you're scanning, but you have a PlayStation inside your network. 165 00:18:01,930 --> 00:18:04,230 You see, you have a Sonny Wallman Ericsson. 166 00:18:04,370 --> 00:18:08,310 Um, and that's how we came to OSFiller. 167 00:18:08,650 --> 00:18:15,550 OSFiller, if you know, uh, packets are inside the kernel space and you are, uh, on, uh, on user space. 168 00:18:15,590 --> 00:18:19,330 So you can not interact with packets in real time. 169 00:18:20,490 --> 00:18:23,610 So, uh, the solution was to use NFQ. 170 00:18:23,610 --> 00:18:35,390 NFQ is, uh, an extension for IP tables that accepts some, uh, some, uh, uh, extensions and lets you put all the packets inside some queues. 171 00:18:35,770 --> 00:18:38,030 So you have two elements. 172 00:18:38,030 --> 00:18:41,850 You have a queue handler that deals with the, with the packets, with the kernel. 173 00:18:41,850 --> 00:18:47,150 So it tells the kernel, just give me the packets and it moves to user space. 174 00:18:47,150 --> 00:18:51,810 In user space, you can receive those packets, manipulate them and send them back. 175 00:18:52,030 --> 00:18:57,050 The only problem here is that you have a maximum queue length that is 1,424. 176 00:18:57,110 --> 00:19:05,510 So you have to manipulate all those packets very, very fast because if you don't and the queue gets full, all the traffic will be re, will be rejected. 177 00:19:05,510 --> 00:19:07,110 And that's a big problem. 178 00:19:08,750 --> 00:19:15,070 So if just, just take a look , for example, 179 00:19:20,660 --> 00:19:22,520 let me see if I can. 180 00:19:49,330 --> 00:19:50,370 Okay. 181 00:20:04,870 --> 00:20:05,690 Okay. 182 00:20:05,890 --> 00:20:12,960 Now you have, I think that you can see the screen now. 183 00:20:13,000 --> 00:20:23,600 If you, for example, do an Nmap scan for localhost, it will give no information why because I don't have any open port. 184 00:20:23,600 --> 00:20:26,960 So let's start, for example, secure cell. 185 00:20:31,350 --> 00:20:36,570 So we have, I'm running a Kali. 186 00:20:36,570 --> 00:20:42,150 I have the Linux with kernel version 3, 3.7 to 3.10. 187 00:20:42,370 --> 00:20:45,510 So this is all information that Nmap can give me. 188 00:20:45,510 --> 00:20:51,910 So we will be using our tool is OSFueler. 189 00:20:52,190 --> 00:20:54,030 OSFueler is working. 190 00:20:54,450 --> 00:20:56,170 So what can you do? 191 00:20:56,910 --> 00:21:08,890 First of all, just let you know that here we are only dealing with, in case of Nmap, only dealing with a specific test for Nmap. 192 00:21:08,890 --> 00:21:15,990 All the traffic, all the traffic should go directly to your computer and shouldn't be manipulated in any way. 193 00:21:16,130 --> 00:21:26,010 So, for example, if you just want to take a look at what kind of operating systems do you have, minus N. 194 00:21:26,910 --> 00:21:29,750 We are interacting with the official Nmap database. 195 00:21:29,750 --> 00:21:32,090 So you can just update it and we will be working. 196 00:21:32,090 --> 00:21:39,910 So this is almost all the operating systems that are available right now. 197 00:21:40,370 --> 00:21:41,690 There are a lot of them. 198 00:21:41,690 --> 00:21:49,830 Just to let you know that it has like 5,500 signatures. 199 00:21:49,870 --> 00:21:54,190 So there are a lot of operating systems to emulate. 200 00:21:54,190 --> 00:22:05,130 So if you do the same thing, for example, with Poth, the same. 201 00:22:05,530 --> 00:22:12,570 In this case you have to deal with what kind of operating system do you want and then you go to the versions. 202 00:22:12,570 --> 00:22:16,950 In this case, Nmap, with OSFueler you can go in both ways. 203 00:22:16,950 --> 00:22:27,290 You can specify I want to be like a Windows and I need the version to be like XP or 2000 or maybe you just specify the family. 204 00:22:27,290 --> 00:22:34,030 I need to be Windows and every packet that you are sending will be in a loop and you will be changing your ID inside Windows. 205 00:22:34,030 --> 00:22:41,010 For example, the first one will be XP, second one will be 98, the third one will be 2000, that kind of things randomly. 206 00:22:42,250 --> 00:22:45,910 There are not so much signatures for Poth. 207 00:22:46,310 --> 00:22:58,390 There are like 250 and there is a special flag that if you just want to search, for example, give me all the information that you have. 208 00:22:58,390 --> 00:23:02,230 Not for Windows but let's see if you have something that is smaller. 209 00:23:02,770 --> 00:23:12,430 For PlayStation, Nmap has like 1, 2, 3, 4, 5 signatures available for PlayStation and you have one available for Poth. 210 00:23:15,380 --> 00:23:20,000 In this case there are two queues for the traffic. 211 00:23:20,000 --> 00:23:24,520 One will go to Poth to basic fingerprinting. 212 00:23:24,520 --> 00:23:26,900 The other one will go only to Nmap. 213 00:23:26,900 --> 00:23:36,060 So when you are running OSFiller you get those different queues and in this case the program is running in multithreading. 214 00:23:36,160 --> 00:23:45,580 So I have made some tests, not some stress tests but because last day in the demo labs people asked me about the performance. 215 00:23:45,660 --> 00:23:58,360 So when using in a web server without a lot of connection you have to understand that you have 1,024 packets per queue. 216 00:23:58,360 --> 00:24:01,800 But in case of Nmap, Nmap sends like 20 packets. 217 00:24:01,800 --> 00:24:15,280 So to get the queue full you will need maybe like 200 attackers scanning at the same time and yourself running a Celeron or something like that. 218 00:24:15,400 --> 00:24:23,520 So if you just wanted to, let's search if we can do Nmap. 219 00:24:26,800 --> 00:24:32,040 Let's search for Windows Poth Nmap. 220 00:24:32,160 --> 00:24:35,460 For example this one. 221 00:24:39,330 --> 00:24:48,230 Now I have the information so let's emulate to be Microsoft Windows 2000. 222 00:24:48,230 --> 00:24:51,210 And you get this info. 223 00:24:51,210 --> 00:24:52,990 You are mutating to Nmap. 224 00:24:52,990 --> 00:24:57,090 You get in the database the signature. 225 00:24:57,090 --> 00:25:00,970 You can see that there are some proofs that we shouldn't respond. 226 00:25:00,970 --> 00:25:04,770 For example for UDP, for example for ICMP. 227 00:25:04,810 --> 00:25:13,470 And if you open a new window, let's repeat the same test. 228 00:25:21,550 --> 00:25:22,450 Do you see? 229 00:25:23,410 --> 00:25:27,830 Nmap thinks that we are running Microsoft Windows 2000 or maybe XP. 230 00:25:27,830 --> 00:25:38,510 That's because the signatures are very similar and Nmap doesn't have all the information it needs to complete the profiling of my operating system. 231 00:25:39,530 --> 00:25:57,390 If you use the verbose option and you launch the same scan, you will get information for every packet that you receive from Nmap. 232 00:25:57,490 --> 00:26:05,330 So for example you remember I told you that UDP test in Nmap has a payload of 300 C's. 233 00:26:06,890 --> 00:26:08,630 You can see it here. 234 00:26:08,630 --> 00:26:23,930 So this is not only useful to try to defeat Nmap but you can also let it run in the background and write directly all this information to a log and try to get information when you are getting a scan. 235 00:26:24,330 --> 00:26:29,130 The same thing we can do with for example Puff. 236 00:26:31,010 --> 00:26:34,890 We search Windows for example. 237 00:26:35,230 --> 00:26:39,230 Let's work with 2002. 238 00:26:45,660 --> 00:26:59,120 So family is Windows, details are this and interface would be localhost. 239 00:26:59,480 --> 00:27:00,160 The same. 240 00:27:00,160 --> 00:27:08,200 You get here the signature for Windows 2000 and let's get in Puff. 241 00:27:08,200 --> 00:27:08,200 Let's get 242 00:27:15,160 --> 00:27:15,760 in Puff. 243 00:27:15,760 --> 00:27:20,420 Just let me launch some localhost connections. 244 00:27:22,080 --> 00:27:30,560 If you see I have started a secure cell connection and Puff thinks that we are running Microsoft Windows XP. 245 00:27:31,280 --> 00:27:45,040 If you stop always filler and do the same thing, in this case it doesn't have information because it's a newer kernel and all that base of Puff doesn't have it but it's not the same signature. 246 00:27:46,080 --> 00:27:50,000 And you remember I told you that you can just specify the family. 247 00:27:53,680 --> 00:28:01,040 I'm telling filler to try to emulate almost every version of Windows it has on every new packet. 248 00:28:01,820 --> 00:28:15,850 So if you launch Puff, Windows CE, Windows 98, Windows 2000, Windows NT, Windows 98. 249 00:28:15,850 --> 00:28:25,110 So on every connection you will be changing inside the same family your fingerprint. 250 00:28:25,110 --> 00:28:28,950 You can go to random. 251 00:28:32,480 --> 00:28:35,980 In this case it's a sound receiver. 252 00:28:37,200 --> 00:28:40,680 Linux 2.6.39. 253 00:28:41,220 --> 00:28:46,800 Search for playstation. 254 00:28:50,310 --> 00:28:54,810 Now let's see if we can get something cooler. 255 00:29:03,190 --> 00:29:07,550 Sony Ericsson mobile phone. 256 00:29:27,270 --> 00:29:29,470 And you see. 257 00:29:29,730 --> 00:29:31,490 Same thing for this. 258 00:29:33,670 --> 00:29:45,130 So it's very easy for the tool to get all this information to read the Nmap database, to read Puff databases. 259 00:29:45,130 --> 00:29:56,190 Nmap database is working like 95% because there are some signatures that doesn't have all the fields and I have to change the inner working of filler to change that. 260 00:29:56,190 --> 00:30:00,580 But in this case Puff is running with almost every operating system. 261 00:30:00,760 --> 00:30:02,640 And I think that's all. 262 00:30:02,640 --> 00:30:12,700 You can get those fillers using github or using pip and feel free to collaborate on certain issues that you find. 263 00:30:12,700 --> 00:30:16,000 So if there is any question? 264 00:30:17,460 --> 00:30:18,460 Yes? 265 00:30:23,780 --> 00:30:25,800 I can hear you. 266 00:30:28,040 --> 00:30:28,780 No. 267 00:30:28,780 --> 00:30:34,720 In this case we are only dealing with active fingerprint. 268 00:30:39,600 --> 00:30:41,200 This is not valid proof. 269 00:30:41,200 --> 00:30:44,720 This is only a proof of concept for Nmap and for Puff. 270 00:30:44,720 --> 00:30:52,260 If you make some modifications in Nmap for example and you deal with some small changes you can get information about the remote host. 271 00:30:52,260 --> 00:30:57,420 So this is not a valid proof but only proof of concept for those specific tools. 272 00:30:57,420 --> 00:31:06,200 You can still use like DHCP, you can use the MAC address, you can use timing attacks to identify the operating system. 273 00:31:06,200 --> 00:31:08,800 So this is not working for every technique. 274 00:31:08,800 --> 00:31:12,400 Just should be working fine for this kind of tools. 275 00:31:18,790 --> 00:31:19,610 Yes? 276 00:31:25,920 --> 00:31:27,040 Excuse me? 277 00:31:29,990 --> 00:31:31,930 That's what I told you before. 278 00:31:31,930 --> 00:31:49,070 I haven't made any stress test but think of that in the case of FACIF you are only modifying the SIM packets and in the case of Nmap you are only dealing with almost 20 packets per scan. 279 00:31:49,070 --> 00:31:52,590 So that shouldn't be a problem. 280 00:31:52,590 --> 00:32:03,410 You should maybe have a slow machine and have like 200 or 400 attackers scanning you at the same time to get the queue full and the program works with multithreading. 281 00:32:03,410 --> 00:32:08,690 So I haven't made a lot of tests but it should be working fine. 282 00:32:08,690 --> 00:32:14,410 I'm using like on my pen test when I'm trying to do research and it's working fine. 283 00:32:14,410 --> 00:32:18,290 With some servers I have on internet and it's working okay. 284 00:32:18,490 --> 00:32:27,750 But if any of you can get those information, that information about the performance, it should be great to have it inside the GitHub. 285 00:32:33,040 --> 00:32:34,240 Thank you.