1 00:00:12,640 --> 00:00:16,020 With the University of Southern Mississippi an anti-child porn 2 00:00:16,020 --> 00:00:22,420 organization now incorporated at this point I'll probably have to say that 3 00:00:22,420 --> 00:00:25,220 University of Southern Mississippi has the greatest IT department computer 4 00:00:25,220 --> 00:00:27,900 science program I have to say that now 5 00:00:31,700 --> 00:00:38,900 can you hear me all righty again my name is Tim Lawless with the 6 00:00:38,900 --> 00:00:44,600 University of Southern Mississippi and anti-child porn organization I'm here to 7 00:00:44,600 --> 00:00:50,280 talk about a little project I've been working on St. Jude where 8 00:00:51,330 --> 00:00:54,600 we're trying to detect improper root transitions 9 00:01:03,900 --> 00:01:07,980 of course the computer thinks it's a Monday's do 10 00:01:11,020 --> 00:01:16,680 actually no star office really really happy with this person this is my email 11 00:01:16,680 --> 00:01:21,060 address and we'll be dropping this presentation plus other information out 12 00:01:21,060 --> 00:01:24,200 on this URL a little bit later on today 13 00:01:26,480 --> 00:01:32,900 St. Jude really came about because in our institution we have to allow 14 00:01:32,900 --> 00:01:37,680 clear text passwords on a lot of systems which as you know is the most evil thing 15 00:01:37,680 --> 00:01:44,960 that one can do and once you get in they pretty much it's just a matter of time 16 00:01:46,040 --> 00:01:51,280 so we started looking for a way to save ourselves a lot of time from sleeping 17 00:01:51,280 --> 00:01:51,820 on the floor 18 00:01:54,600 --> 00:01:55,460 one thing led to another 19 00:01:56,500 --> 00:02:02,380 Guy put forth an idea back in October I believe of ninety seven and a system in 20 00:02:02,380 --> 00:02:10,180 magazine about actually trying connect the transitions into the root user by 21 00:02:10,180 --> 00:02:12,500 monitoring audit trails and the solaris 22 00:02:13,760 --> 00:02:18,220 that's really where we were we got the beginning of this rock has come forward 23 00:02:19,920 --> 00:02:23,980 the reason why we had to go and start looking at things like this is because 24 00:02:23,980 --> 00:02:25,820 is our firewalls really will not protect us. 25 00:02:26,060 --> 00:02:28,140 We also, with clear text passwords coming in, 26 00:02:30,740 --> 00:02:33,360 our users themselves will expose our systems. 27 00:02:33,900 --> 00:02:36,860 They're sometimes our best friends and our worst enemies. 28 00:02:41,000 --> 00:02:41,720 As they would, 29 00:02:44,060 --> 00:02:50,420 the misuse detection scanners like Snort and the like 30 00:02:51,120 --> 00:02:53,000 really would not pick up everything. 31 00:02:53,980 --> 00:02:57,560 We've already seen how they can be bypassed, 32 00:02:58,160 --> 00:03:01,720 how the systems that we're putting out on our host 33 00:03:01,720 --> 00:03:05,300 really themselves can be defeated 34 00:03:05,300 --> 00:03:07,280 and you will see this continually through the day. 35 00:03:08,020 --> 00:03:11,220 And of course, we've come to love our Unix vendors, 36 00:03:11,460 --> 00:03:13,820 the ones who give us new root exploits 37 00:03:13,820 --> 00:03:15,400 in every update that they send out. 38 00:03:17,980 --> 00:03:21,340 And we also, the problem also with our detection 39 00:03:21,340 --> 00:03:23,900 is that you may go one, two days without finding it. 40 00:03:24,680 --> 00:03:27,020 Unfortunately, the system ends real good on vacation. 41 00:03:28,380 --> 00:03:29,800 And the longer that that is, 42 00:03:30,480 --> 00:03:32,280 the more damage will be done to the system. 43 00:03:33,120 --> 00:03:34,800 But any time that they're on the system, 44 00:03:34,900 --> 00:03:36,840 we can't trust anything really on the system itself. 45 00:03:39,380 --> 00:03:40,640 So that's where we began. 46 00:03:42,460 --> 00:03:43,560 When we began the project, 47 00:03:43,620 --> 00:03:45,180 we wanted to produce ultimately 48 00:03:45,180 --> 00:03:46,740 a kernel level IDS implementation. 49 00:03:49,140 --> 00:03:51,760 Our target was Solaris, but we went over to Linux 50 00:03:52,280 --> 00:03:53,660 because it was easier to do development. 51 00:03:53,660 --> 00:03:54,880 There was a little bit more information 52 00:03:55,470 --> 00:03:57,540 just to get the wheels going. 53 00:03:59,380 --> 00:03:59,920 Pardon. 54 00:04:03,780 --> 00:04:04,780 I can't... 55 00:04:11,080 --> 00:04:13,200 We also wanted to try to minimize 56 00:04:13,200 --> 00:04:15,540 the number of false positives that we would be getting 57 00:04:15,540 --> 00:04:17,340 and of course the negatives. 58 00:04:17,820 --> 00:04:20,520 That was a problem with the original implementation 59 00:04:20,520 --> 00:04:22,340 put forth in sysadmin is 60 00:04:23,660 --> 00:04:29,220 heap load of false negatives before we would be able to really respond to anything we we want to 61 00:04:29,740 --> 00:04:35,260 reduce those uh false negative false positives uh to a point where we won't shoot our users 62 00:04:35,260 --> 00:04:42,800 plus we'll be able to catch enough of what's really going on so what we were doing 63 00:04:45,220 --> 00:04:49,120 we used to reference monitor implementation i believe you'll probably hear a little bit more 64 00:04:49,120 --> 00:04:55,840 about this later on this evening um when we talk when uh gentleman talks about uh penetrating uh b1 65 00:04:55,840 --> 00:05:05,060 systems um we also went to a rule-based anomaly detection um in just a moment i'll go in a little 66 00:05:05,060 --> 00:05:13,040 bit more about that and uh modeled behavior for execution after uh reviewing um copious bsm outputs 67 00:05:16,120 --> 00:05:18,860 now before we get into this i'll go into a little bit of 68 00:05:19,120 --> 00:05:27,960 a talk about um subjects and objects uh how many here have dealt with uh maybe trusted operating 69 00:05:27,960 --> 00:05:35,560 systems yes no good excellent so you'll follow what i'm saying the subjects are are the things 70 00:05:35,560 --> 00:05:41,240 that do things onto other things well the objects are those which are being done too a little bit 71 00:05:41,240 --> 00:05:47,700 better definition is up there we'll also sometimes see that our subjects will be the objects themselves 72 00:05:49,120 --> 00:05:49,200 um 73 00:05:57,760 --> 00:06:04,420 the reference monitor was it will be enforcing our um policy by forcing all actions performed 74 00:06:05,060 --> 00:06:10,720 by the subject to actually um go through it it will act sort of as a stop gap to prevent 75 00:06:10,720 --> 00:06:13,240 things from occurring which we really do not want to occur 76 00:06:13,900 --> 00:06:14,420 um 77 00:06:18,160 --> 00:06:18,960 the uh 78 00:06:19,120 --> 00:06:23,500 rule-based anomaly ids as opposed to our statistical anomaly ids systems 79 00:06:28,020 --> 00:06:29,720 given given a rule set if 80 00:06:31,580 --> 00:06:37,600 looking at a chain of events we'll start off with the beginning where we'll enter the rule set 81 00:06:37,600 --> 00:06:43,080 and we'll move forward if at some point one of the options at that point is not actually what 82 00:06:43,080 --> 00:06:48,800 is occurring we have an anomaly going on that's really uh what this what this guy's about it was 83 00:06:49,120 --> 00:06:57,860 implemented um at lol now and the um wisdom in sense and also the tim's project uh with digital 84 00:06:57,860 --> 00:06:59,700 corporation um 85 00:07:04,460 --> 00:07:09,040 what we're going to be doing is uh looking at we take every subject out 86 00:07:09,040 --> 00:07:14,760 or process in our case um we would classify it as being a privileged or unprivileged process 87 00:07:16,120 --> 00:07:17,700 um the privileges 88 00:07:20,400 --> 00:07:26,940 we'll be root but it also would be a set of root plus somebody else this would allow us to detect 89 00:07:26,940 --> 00:07:32,300 transitions into say oracle users or other uh damage that we're running within the system 90 00:07:34,340 --> 00:07:36,560 unprivileged subjects just normal user processes 91 00:07:36,560 --> 00:07:42,120 will transition up like we know through execution of the set uid binaries 92 00:07:46,440 --> 00:07:48,960 in doing so we then have to 93 00:07:49,120 --> 00:07:53,040 catch them and determine how they're beginning where they're beginning in the in the chain 94 00:07:53,040 --> 00:08:00,560 of events that may then occur um the privileged subjects the processes will drop their privileges 95 00:08:00,560 --> 00:08:05,940 through one of uh and when it's one of uh these three calls i believe under slurge we'll be 96 00:08:05,940 --> 00:08:12,520 dealing with uh force fourth one um given the subject with privilege um 97 00:08:13,500 --> 00:08:18,760 and this is really where the decision is made they may execute any other uh following system 98 00:08:19,120 --> 00:08:24,880 to exceed only if the subject first drops its privileges through one of the means we just uh 99 00:08:24,880 --> 00:08:30,840 talked about before and the um object is within the subject or the objects is within the uh 100 00:08:30,840 --> 00:08:39,760 restriction list uh within the um rule base a subject without privilege may execute any object 101 00:08:43,120 --> 00:08:48,100 just a normal user may go about his daily life as long as they do not transition up into a privileged 102 00:08:48,100 --> 00:08:48,460 state 103 00:08:49,120 --> 00:08:51,640 we're gonna be perfectly okay and allow them to do what they want 104 00:08:52,940 --> 00:08:56,620 now upon execution we're going to have to do some stuff and 105 00:08:56,620 --> 00:09:03,520 juggle around change our states uh where once upon execution the new subjects restriction 106 00:09:03,520 --> 00:09:09,940 list will be updated based upon the subject's prior state and the optics executed i'll show 107 00:09:09,940 --> 00:09:18,920 you in a moment where we go through and um have to say we're running a binary um he 108 00:09:18,920 --> 00:09:21,780 He calls another function and he's okay to execute. 109 00:09:21,880 --> 00:09:23,260 We've already passed it on. 110 00:09:23,580 --> 00:09:28,840 The binary will then find the best rule 111 00:09:28,840 --> 00:09:31,560 and we have to ensure that the next rule 112 00:09:31,560 --> 00:09:35,420 for what the next guy that's about to run can do 113 00:09:35,420 --> 00:09:39,560 is a subset of the current processes rule. 114 00:09:39,700 --> 00:09:41,580 Otherwise, we could gain privileges 115 00:09:42,220 --> 00:09:45,600 just merely by executing a certain path of applications. 116 00:09:50,000 --> 00:09:52,180 And finally, a subject's outdated restriction 117 00:09:52,180 --> 00:09:54,780 must be subject of the subject's prior restriction 118 00:09:54,780 --> 00:09:56,120 that somebody is submitting to. 119 00:09:57,660 --> 00:09:59,540 This is currently where we're standing right now. 120 00:09:59,620 --> 00:10:01,620 We've got a SLURS Perl implementation. 121 00:10:02,780 --> 00:10:06,960 It'll run currently under SLURS 251 through eight. 122 00:10:07,500 --> 00:10:10,240 Eight has some problems with its arguments 123 00:10:10,240 --> 00:10:13,700 where it will not give those out to us in the BSM. 124 00:10:14,480 --> 00:10:17,460 It's not yet been fixed by us in Microsystems. 125 00:10:17,840 --> 00:10:18,900 And the BSM is not yet fixed by us in Microsystems. 126 00:10:18,920 --> 00:10:23,960 The current Linux implementation is running at this time 127 00:10:23,960 --> 00:10:25,520 not in multiprocessor system. 128 00:10:26,680 --> 00:10:30,120 We do not use argvs for context 129 00:10:30,120 --> 00:10:32,020 in the Perl module at this point. 130 00:10:32,240 --> 00:10:34,740 But under SLURS, I mean under the Linux kernel, 131 00:10:34,840 --> 00:10:37,900 we are using the arguments to decide our context. 132 00:10:38,600 --> 00:10:40,840 The reason this being is some applications 133 00:10:40,840 --> 00:10:42,740 will make a call to system, for example, 134 00:10:43,540 --> 00:10:47,920 which goes out there and will run slash bin slash sh 135 00:10:47,920 --> 00:10:49,160 with the dash minus c. 136 00:10:49,620 --> 00:10:54,660 And then the argument passed the system as the third argv. 137 00:10:55,700 --> 00:10:57,640 Argv of two, you know, third argument. 138 00:10:58,620 --> 00:11:00,820 Without being able to look at our argvs 139 00:11:00,820 --> 00:11:03,140 for the context of what we wanted to do, 140 00:11:03,220 --> 00:11:06,200 we would then just have to allow these programs 141 00:11:06,200 --> 00:11:09,920 that are executing a system call 142 00:11:09,920 --> 00:11:13,280 to then just go merrily out and run in the shell, 143 00:11:13,480 --> 00:11:15,400 which is something bad. 144 00:11:18,900 --> 00:11:21,620 We're hoping to have an internal SLURS implementation 145 00:11:21,960 --> 00:11:25,120 out by around Christmas of this year, 146 00:11:25,180 --> 00:11:27,060 maybe early 2001 at worst. 147 00:11:28,960 --> 00:11:38,520 Probably in the 27, 7.7 kernel, 8.0 at worst. 148 00:11:39,580 --> 00:11:44,420 And just to show you, I'll switch the slides, I'm sorry. 149 00:11:45,900 --> 00:11:47,660 Externally, internal versus external. 150 00:11:47,920 --> 00:11:48,900 Inside or outside the kernel. 151 00:11:52,280 --> 00:11:54,360 When we implement, when we would do this, 152 00:11:55,500 --> 00:11:57,660 to be able to really stop the things before they occur, 153 00:11:57,760 --> 00:12:00,400 we would have to do it within the kernel to preempt them. 154 00:12:01,240 --> 00:12:02,920 However, when we go into the kernel, 155 00:12:02,960 --> 00:12:04,020 some things change. 156 00:12:04,900 --> 00:12:06,740 Externally, when we get them out through our audit trails, 157 00:12:07,620 --> 00:12:12,220 each event is a discrete instance. 158 00:12:13,680 --> 00:12:15,000 One line is one event. 159 00:12:15,080 --> 00:12:17,180 We have all the information about what's going on. 160 00:12:17,180 --> 00:12:18,800 While inside the kernel, we're watching it 161 00:12:18,800 --> 00:12:20,100 as it's actually going on. 162 00:12:21,200 --> 00:12:23,820 Sometimes we have to wait until another event occurs 163 00:12:23,820 --> 00:12:25,340 before we can just really determine 164 00:12:25,340 --> 00:12:27,200 what happened with the prior event. 165 00:12:27,900 --> 00:12:30,560 For example, with the execution of a set UID binary, 166 00:12:30,880 --> 00:12:36,620 the execution code down in the file system objects 167 00:12:37,800 --> 00:12:41,760 in the Linux kernel will actually set the UID 168 00:12:41,760 --> 00:12:47,160 and the effective user ID to zero during the execution. 169 00:12:47,180 --> 00:12:49,340 The execution phase, however, since exec never returns, 170 00:12:49,500 --> 00:12:52,960 we never really know that a set UID binary has, in fact, 171 00:12:53,140 --> 00:12:56,300 been executed until another event occurs 172 00:12:56,300 --> 00:12:57,300 and we can really see, 173 00:12:58,860 --> 00:13:00,780 we can infer from what has changed 174 00:13:00,780 --> 00:13:02,080 in the state of the system 175 00:13:03,700 --> 00:13:08,200 that it was, in fact, a set UID binary that went forth, 176 00:13:08,300 --> 00:13:12,820 and then we build our trees from there. 177 00:13:14,360 --> 00:13:16,380 Externally, the detection is delayed. 178 00:13:16,640 --> 00:13:17,160 Externally, the detection is delayed. 179 00:13:17,180 --> 00:13:18,380 Solaris implementation, we're seeing 180 00:13:18,380 --> 00:13:23,060 about two, three seconds on a single processor system, 181 00:13:23,660 --> 00:13:26,160 a little bit less on a multiple processor system, 182 00:13:26,260 --> 00:13:27,760 but at that point, we begin racing 183 00:13:27,760 --> 00:13:30,400 to see who can kill whom first. 184 00:13:30,800 --> 00:13:34,380 Also, externally, it is easy within those two seconds, 185 00:13:34,520 --> 00:13:37,080 two, three seconds, to strip a kill 186 00:13:37,080 --> 00:13:39,700 of the external monitor. 187 00:13:42,040 --> 00:13:43,960 Within the kernel, it's a little bit harder. 188 00:13:44,140 --> 00:13:46,300 You would have to do it before actually doing an exec, 189 00:13:46,300 --> 00:13:48,700 which would require you to have the code 190 00:13:48,700 --> 00:13:50,480 within the module itself. 191 00:13:52,500 --> 00:13:55,480 For example, this little application 192 00:13:56,760 --> 00:13:58,760 will execute a bash shell. 193 00:13:59,820 --> 00:14:02,180 Give us, if it's set UID root, 194 00:14:02,320 --> 00:14:03,360 would give us root normally. 195 00:14:04,580 --> 00:14:07,520 Let me just go over here for a second. 196 00:14:09,500 --> 00:14:10,640 Let's see if it thinks. 197 00:14:14,720 --> 00:14:15,320 Normally, 198 00:14:17,000 --> 00:14:17,980 we're running this. 199 00:14:22,480 --> 00:14:24,100 We've dropped out to a root shell 200 00:14:24,100 --> 00:14:26,320 upon execution of the binary. 201 00:14:29,020 --> 00:14:32,960 However, going through the syncing model. 202 00:14:33,180 --> 00:14:34,620 The font? 203 00:14:34,800 --> 00:14:35,500 Yes, sir. 204 00:14:35,560 --> 00:14:36,580 Just a second, please. 205 00:14:46,300 --> 00:14:46,940 OK. 206 00:14:53,440 --> 00:14:56,240 It was 207 00:14:56,240 --> 00:15:00,320 I subscribe please. 208 00:15:02,400 --> 00:15:06,220 That would be fine, but ... 209 00:15:09,940 --> 00:15:16,000 OK, go ahead. 210 00:15:16,000 --> 00:15:16,280 Do you want it anymore? 211 00:15:24,560 --> 00:15:25,960 Maybe that'll work. 212 00:15:27,480 --> 00:15:28,040 Whoa. 213 00:15:31,400 --> 00:15:32,540 It did get big. 214 00:15:33,960 --> 00:15:34,520 Well. 215 00:15:42,120 --> 00:15:42,680 Okay. 216 00:15:42,980 --> 00:15:44,280 Let's try this one again. 217 00:15:45,220 --> 00:15:45,660 Normally. 218 00:15:46,980 --> 00:15:48,880 It would be dropped out to a rich shell. 219 00:15:56,380 --> 00:15:56,820 Possibly. 220 00:16:24,580 --> 00:16:25,860 Normally at this point. 221 00:16:26,060 --> 00:16:29,520 Your friendly administrator will spend the next evening. 222 00:16:30,200 --> 00:16:31,880 Instead of with his wife and kids. 223 00:16:32,280 --> 00:16:33,220 Rebuilding a system. 224 00:16:34,360 --> 00:16:36,680 What we want to do. 225 00:16:38,860 --> 00:16:39,580 What we want to do. 226 00:16:39,640 --> 00:16:39,960 I'm sorry. 227 00:16:40,120 --> 00:16:40,680 Let me just. 228 00:16:41,780 --> 00:16:42,220 Okay. 229 00:16:45,420 --> 00:16:46,680 I'm going to go in here. 230 00:16:52,520 --> 00:16:53,620 Light up the module. 231 00:16:55,520 --> 00:16:56,240 And then. 232 00:16:56,940 --> 00:16:58,580 It catches the exec. 233 00:16:58,780 --> 00:16:59,780 Just as it begins. 234 00:17:02,700 --> 00:17:04,500 It kills it at the exec process. 235 00:17:04,680 --> 00:17:04,980 And. 236 00:17:06,980 --> 00:17:08,580 We just drop out a message. 237 00:17:08,920 --> 00:17:09,400 Oops. 238 00:17:09,740 --> 00:17:10,000 Well. 239 00:17:12,220 --> 00:17:12,520 We're doing it. 240 00:17:12,520 --> 00:17:12,980 To K log. 241 00:17:20,600 --> 00:17:21,500 There are some. 242 00:17:25,720 --> 00:17:26,320 This one. 243 00:17:26,380 --> 00:17:26,620 Catch. 244 00:17:26,780 --> 00:17:27,960 The buffer overflows. 245 00:17:28,100 --> 00:17:28,540 We tried it. 246 00:17:28,600 --> 00:17:29,420 With several buffer. 247 00:17:29,660 --> 00:17:30,820 Pretty much all of them. 248 00:17:30,900 --> 00:17:31,320 Overflows. 249 00:17:31,440 --> 00:17:31,900 We could. 250 00:17:32,100 --> 00:17:34,100 I try not to keep many buffer overflow. 251 00:17:34,420 --> 00:17:35,460 Vulnerabilities on my laptop. 252 00:17:40,240 --> 00:17:41,080 I apologize. 253 00:17:41,220 --> 00:17:41,760 I'm nervous. 254 00:17:42,000 --> 00:17:42,200 Yeah. 255 00:17:52,120 --> 00:17:55,400 Let's see if I can just minimize this guy. 256 00:17:57,500 --> 00:17:59,320 Right now there's no other tracing. 257 00:18:00,520 --> 00:18:02,040 We were playing into kernel. 258 00:18:02,540 --> 00:18:04,440 Well we're not outputting any tracing. 259 00:18:06,300 --> 00:18:13,440 There's some extra tracing in there depending on the compile time defines you do, but right 260 00:18:13,440 --> 00:18:20,000 now the minimal ones will just make your hard drive rattle for several hours for just running 261 00:18:20,000 --> 00:18:20,340 an LS. 262 00:18:22,460 --> 00:18:31,200 It is feasible to add in additional tracing into the system, just modifying the source 263 00:18:31,200 --> 00:18:33,320 code of the main app. 264 00:18:35,980 --> 00:18:39,620 I'll get into the source code in just a minute, let me find my window. 265 00:18:47,540 --> 00:18:50,500 I'm going to have to fast forward through these again probably. 266 00:18:57,740 --> 00:19:01,320 Unfortunately some things in Unix are not quite as good as they are in Windows yet. 267 00:19:02,280 --> 00:19:02,680 Oh! 268 00:19:02,680 --> 00:19:04,840 Pay attention to. 269 00:19:08,140 --> 00:19:10,440 I feel like I'm doing patches right now. 270 00:19:18,720 --> 00:19:20,740 Unfortunately right now there is no silver bullet. 271 00:19:20,840 --> 00:19:22,880 Not even this guy can really stop everything. 272 00:19:23,340 --> 00:19:24,900 He would be just another layer in there. 273 00:19:25,860 --> 00:19:28,900 For example with the buffer overflow, the buffer overflow actually does occur. 274 00:19:29,720 --> 00:19:31,600 The shellcode does get executed. 275 00:19:31,780 --> 00:19:32,160 However. 276 00:19:32,680 --> 00:19:36,720 Just at that execute is where it's caught and it's stopped. 277 00:19:36,880 --> 00:19:42,060 That's why it's referred to as the last ditch effort right before hellfire and brimstone 278 00:19:42,060 --> 00:19:43,260 falls down upon us. 279 00:19:45,380 --> 00:19:47,500 Also, the restriction rules must be written. 280 00:19:48,040 --> 00:19:52,500 There are some applications, for example, I discovered when I came here, I have been 281 00:19:52,500 --> 00:19:59,900 spoiled all my life and have not used PPP yet, that the Usernet CTL script causes that 282 00:20:00,440 --> 00:20:02,060 module to go really wild. 283 00:20:02,060 --> 00:20:16,760 So you have to go through and write out the rules in the script before it will not catch 284 00:20:16,760 --> 00:20:18,060 those and actually let them pass. 285 00:20:19,200 --> 00:20:20,800 Also, there's the additional overhead. 286 00:20:20,940 --> 00:20:29,460 As we're playing around within the kernel, just doing the extra stuff and munging the 287 00:20:29,460 --> 00:20:31,140 data, it costs a little bit. 288 00:20:31,140 --> 00:20:39,300 Just executing user processes without going through, having to do any of the checks. 289 00:20:40,020 --> 00:20:42,580 We're seeing less than a 1% slowdown. 290 00:20:42,680 --> 00:20:49,640 However, let's say we're root and we're compiling a kernel, see almost a 5% slowdown 291 00:20:49,640 --> 00:20:50,300 at that point. 292 00:20:50,600 --> 00:20:55,140 And it's really spending it in system time now because we're having to update all of 293 00:20:55,140 --> 00:20:57,120 our checklists. 294 00:20:57,360 --> 00:21:00,140 There's really no optimizations in at this time. 295 00:21:00,860 --> 00:21:03,180 We do have some inline functions, but that's it. 296 00:21:06,220 --> 00:21:11,000 Now, the rule sets that I spoke of, that's the end of the slide presentation, I'm sorry. 297 00:21:16,180 --> 00:21:17,920 No network connection right now. 298 00:21:18,040 --> 00:21:18,320 Sorry. 299 00:21:19,380 --> 00:21:19,960 Oh, yeah. 300 00:21:20,120 --> 00:21:21,920 Well, let me just hit that right here. 301 00:21:28,260 --> 00:21:29,680 Well, unfortunately, it's not. 302 00:21:29,680 --> 00:21:33,140 It's not PowerPoint, but religious reasons prevent me from using that. 303 00:21:38,020 --> 00:21:39,820 That's the contact information once again. 304 00:21:40,200 --> 00:21:45,240 Probably by 1 or 2 o'clock this afternoon, we'll probably have this PowerPoint out there 305 00:21:45,240 --> 00:21:47,200 along with the source code. 306 00:21:47,300 --> 00:21:50,440 The source code is available on PacketStorm at this time. 307 00:21:50,860 --> 00:21:52,860 I sent out an update last night. 308 00:21:55,420 --> 00:21:56,260 You got it? 309 00:21:57,940 --> 00:21:58,460 Good? 310 00:21:59,640 --> 00:22:00,140 Okay. 311 00:22:03,600 --> 00:22:04,100 Okay. 312 00:22:04,580 --> 00:22:06,180 Now, that will... 313 00:22:09,400 --> 00:22:12,280 Let's try to get this a little bit smaller. 314 00:22:18,160 --> 00:22:19,000 Much better. 315 00:22:20,900 --> 00:22:22,080 Can you hear me? 316 00:22:22,140 --> 00:22:22,320 Good. 317 00:22:23,480 --> 00:22:23,980 All right. 318 00:22:24,600 --> 00:22:25,100 Thanks. 319 00:22:27,100 --> 00:22:28,320 I'm going to go ahead and run this. 320 00:22:28,320 --> 00:22:28,440 I'm going to go ahead and take a look at the data. 321 00:22:41,740 --> 00:22:42,180 Whoa. 322 00:22:43,340 --> 00:22:47,580 For example, right down here are the general rules that we've, the rule sets. 323 00:22:47,700 --> 00:22:51,860 And unfortunately, we're having to compile them in by hand right now, not reading them at load time. 324 00:22:57,820 --> 00:23:04,720 We do want to be able to go to root sometimes, and so we're going to have some guys that really have to be granted a pardon. 325 00:23:05,140 --> 00:23:12,400 SU and sudo, by the way, sudo is bad, you should never use it, are in there. 326 00:23:14,560 --> 00:23:20,920 Gene mixer was one that just had to go in there because it will execute mod probe through system. 327 00:23:21,860 --> 00:23:22,420 As root. 328 00:23:24,000 --> 00:23:27,540 Otherwise, sound gets really loud and you can't, or you can't turn it off. 329 00:23:32,420 --> 00:23:33,740 Are there any questions? 330 00:23:34,520 --> 00:23:35,080 Yes? 331 00:23:35,520 --> 00:23:39,560 I'm not using it to be able to block the sqid, but would it be a part? 332 00:23:40,520 --> 00:23:41,080 Pardon? 333 00:23:41,200 --> 00:23:43,020 Or a default process sqid? 334 00:23:43,420 --> 00:23:43,980 No. 335 00:23:44,060 --> 00:23:46,480 A setuid process may execute. 336 00:23:46,800 --> 00:23:50,040 However, it may not execute other processes by default. 337 00:23:50,280 --> 00:23:51,760 The default rule down here. 338 00:23:51,860 --> 00:23:54,760 Is actually rule zero, which is none. 339 00:23:54,860 --> 00:24:03,580 You can really go through and execute nothing else, but that setuid process itself may execute by granting all privileges. 340 00:24:03,780 --> 00:24:09,220 It may, it has carte blanche in your system, SU and sudo, of course, would be application where we'd want to do that. 341 00:24:09,460 --> 00:24:20,800 I don't think there would be anything else we'd want to do that for some of the testing that we did just with a couple of things gets really long, unfortunately. 342 00:24:22,180 --> 00:24:24,880 But that's the nature of the beast right now for this guy. 343 00:24:25,160 --> 00:24:30,980 We're wanting to add in later support for just loading it in from a configuration file. 344 00:24:39,700 --> 00:24:41,280 Yes, right now I can. 345 00:24:41,780 --> 00:24:51,500 There is the option in there commented out for debugging purposes to prevent the loading of the unloading options. 346 00:24:51,860 --> 00:25:02,900 We just replaced the load and the clear module syscalls in there. 347 00:25:03,060 --> 00:25:07,280 Now it is still possible to attack it through KMM. 348 00:25:07,580 --> 00:25:16,480 However, personally using lids to prevent that may be something put in this guy later on in the future. 349 00:25:28,800 --> 00:25:32,760 We're going to go into policies, but what kind of issues do we have with the policies? 350 00:25:41,820 --> 00:25:44,180 Policies such as what we're looking at, what we were just looking at. 351 00:25:45,640 --> 00:25:51,060 Initially, what we would have to go do is go through a learning phase where we just run through the system normally. 352 00:25:51,060 --> 00:25:57,520 In a safe environment, not plugged into the network, we just hope we know what we're going to run on the system beforehand. 353 00:25:57,940 --> 00:26:04,840 After determining from the output of the learning process, which does everything but still permits it to actually execute. 354 00:26:05,220 --> 00:26:09,680 It just gives us the error message and from those we then would be able to write these rules. 355 00:26:11,000 --> 00:26:18,560 Once these rules are populated and you've recompiled without the learning option enabled, you'd load that in and go from there. 356 00:26:19,200 --> 00:26:20,760 When you make changes to the system, 357 00:26:21,060 --> 00:26:24,280 which may require these root execute features, 358 00:26:25,360 --> 00:26:29,360 you'd have to modify and reload from there. 359 00:26:29,900 --> 00:26:31,520 How about external ways? 360 00:26:31,580 --> 00:26:34,880 When you have something disappearing, how about externalizing it? 361 00:26:35,000 --> 00:26:36,440 Is it different than someone else? 362 00:26:37,320 --> 00:26:39,420 Now you have the process that you wanted. 363 00:26:39,720 --> 00:26:43,180 Can you just get a little demo of the memory for that process? 364 00:26:45,180 --> 00:26:47,060 Not through this guy. 365 00:26:47,480 --> 00:26:48,320 He's really... 366 00:26:48,320 --> 00:26:50,540 He wraps himself around the kernel. 367 00:26:51,060 --> 00:26:51,480 At this point. 368 00:26:51,580 --> 00:26:54,240 In fact, let me just go into... 369 00:27:03,500 --> 00:27:07,700 Also, since we can't link when we build a module to make it manageable, 370 00:27:07,860 --> 00:27:08,940 we've done includes. 371 00:27:09,680 --> 00:27:11,940 My C professor shit when he saw this. 372 00:27:12,180 --> 00:27:14,120 I think I committed a sin. 373 00:27:16,800 --> 00:27:17,800 Loading the module. 374 00:27:18,580 --> 00:27:21,100 This is just handling the execs since... 375 00:27:21,560 --> 00:27:26,820 I point you to the stuff by Pragmatic of THC for how to handle execs. 376 00:27:28,360 --> 00:27:29,160 We're going down here. 377 00:27:29,240 --> 00:27:30,040 What we do is we... 378 00:27:31,000 --> 00:27:33,760 We're saving the original syscall to a pointer. 379 00:27:33,920 --> 00:27:35,580 We're placing it with our wrapper. 380 00:27:35,740 --> 00:27:38,600 And within that wrapper, we're going to make a call to that original syscall. 381 00:27:40,800 --> 00:27:42,780 So we just wrap ourselves around the kernel. 382 00:27:42,860 --> 00:27:44,160 We're not actually being invasive. 383 00:27:44,380 --> 00:27:47,300 And that's why we can actually pull ourselves out without much problem. 384 00:27:48,120 --> 00:27:48,620 . 385 00:28:05,660 --> 00:28:07,080 That would be possible. 386 00:28:07,440 --> 00:28:09,220 Would not be part of the module itself. 387 00:28:09,500 --> 00:28:10,420 Because it's such... 388 00:28:10,420 --> 00:28:12,780 It would be such an expensive process to do. 389 00:28:12,980 --> 00:28:16,840 Probably through a proc file system interface. 390 00:28:17,300 --> 00:28:19,340 With a monitoring daemon running. 391 00:28:20,040 --> 00:28:21,520 That you would then be able to do that. 392 00:28:25,120 --> 00:28:25,860 I'm sorry. 393 00:28:26,000 --> 00:28:29,600 It was asked whether we would be able to, at some later point, 394 00:28:30,840 --> 00:28:34,140 modify this so that it would communicate or... 395 00:28:34,140 --> 00:28:37,560 And be able to attack the offending processes. 396 00:28:37,860 --> 00:28:41,360 Offending users' processes. 397 00:28:41,620 --> 00:28:45,100 And pretty much retaliate against the login instance. 398 00:28:45,100 --> 00:28:49,260 That may be perpetrating this. 399 00:28:49,840 --> 00:28:51,280 Would I be correct in saying that? 400 00:28:51,580 --> 00:28:55,160 Basically be able to take the information for project citing. 401 00:28:55,340 --> 00:28:57,980 And then do further gathering of what processes are running. 402 00:28:58,680 --> 00:29:03,180 Dump of memory and just... 403 00:29:03,180 --> 00:29:04,660 Whatever you wanted to take from that. 404 00:29:05,280 --> 00:29:08,360 That would be something we'd be doing in an external monitoring application. 405 00:29:08,460 --> 00:29:13,260 The dumping of memory and gathering of further information about the offending processes. 406 00:29:16,380 --> 00:29:17,920 Part of it being expensive. 407 00:29:18,060 --> 00:29:20,160 That will only be executed while... 408 00:29:21,400 --> 00:29:22,960 In a kind of condition, right? 409 00:29:23,200 --> 00:29:23,620 Yeah. 410 00:29:23,760 --> 00:29:30,160 During the execs, forks, and to a much lesser extent, 411 00:29:30,340 --> 00:29:32,440 the set UIDs and exits. 412 00:29:32,860 --> 00:29:34,280 So maybe you could really accelerate this. 413 00:29:34,280 --> 00:29:35,260 It's not over everything. 414 00:29:35,720 --> 00:29:38,500 It's not like this is something that ideally would happen. 415 00:29:38,720 --> 00:29:39,940 If this happens all the time, 416 00:29:39,980 --> 00:29:41,020 is that something really wrong? 417 00:29:41,300 --> 00:29:41,780 Yeah. 418 00:29:44,680 --> 00:29:45,120 Yeah. 419 00:29:45,580 --> 00:29:50,140 I could see how it would be much easier to do it in user space. 420 00:29:51,440 --> 00:29:52,300 Versus kernel space. 421 00:29:52,520 --> 00:29:56,580 Since a lot of the fun with viewing it in kernel space is 422 00:29:56,580 --> 00:29:57,360 you've got this... 423 00:29:57,360 --> 00:29:58,600 You're set right here. 424 00:29:58,760 --> 00:30:00,680 And you're limited in what you can do. 425 00:30:00,820 --> 00:30:01,940 A lot of just... 426 00:30:02,760 --> 00:30:03,480 String calls. 427 00:30:03,680 --> 00:30:05,480 You're going to have to write them yourself since 428 00:30:05,480 --> 00:30:08,180 you cannot call external libraries while in kernel space. 429 00:30:10,180 --> 00:30:10,620 Plus... 430 00:30:10,620 --> 00:30:12,460 If you core dump in kernel space, 431 00:30:12,720 --> 00:30:13,720 that's a bad thing. 432 00:30:16,920 --> 00:30:17,520 Yes. 433 00:30:19,440 --> 00:30:21,680 We lost exec many times. 434 00:30:23,060 --> 00:30:24,400 Everything keeps running. 435 00:30:24,520 --> 00:30:25,540 Nothing else will. 436 00:30:28,680 --> 00:30:29,720 What was that? 437 00:30:30,960 --> 00:30:35,080 But after we load the functions and wrap ourselves, 438 00:30:35,440 --> 00:30:36,800 it just goes on. 439 00:30:38,960 --> 00:30:39,760 Right now, 440 00:30:39,760 --> 00:30:41,400 we're allowed to clean up our module. 441 00:30:41,480 --> 00:30:43,700 We free our memory and go on. 442 00:30:43,800 --> 00:30:47,280 What normally we do to prevent you from cleaning up 443 00:30:47,280 --> 00:30:49,600 or loading in other modules 444 00:30:49,600 --> 00:30:52,880 is we just replace those with an error message of either 445 00:30:52,880 --> 00:30:54,840 for loading no memory 446 00:30:54,840 --> 00:30:56,840 or for clean up module, 447 00:30:56,920 --> 00:30:57,940 module not found. 448 00:30:58,860 --> 00:31:02,780 It just errors out and blocks any attempts to add or remove. 449 00:31:03,300 --> 00:31:06,040 Because those syscalls can be called from within, 450 00:31:06,280 --> 00:31:07,760 for example, buffer overflow. 451 00:31:08,200 --> 00:31:08,380 Okay. 452 00:31:10,740 --> 00:31:11,840 All right. 453 00:31:24,450 --> 00:31:26,040 Apache runs as nobody, 454 00:31:26,760 --> 00:31:29,520 so really you'd be hitting just running in user space 455 00:31:29,520 --> 00:31:30,580 at that point. 456 00:31:32,220 --> 00:31:32,840 Hmm? 457 00:31:34,460 --> 00:31:35,080 Yeah. 458 00:31:36,300 --> 00:31:38,260 If you're just in user... 459 00:31:38,260 --> 00:31:38,800 If you're just... 460 00:31:38,800 --> 00:31:41,380 Without privileges, not root, 461 00:31:41,980 --> 00:31:45,060 we branch out just into the wrapper 462 00:31:45,060 --> 00:31:47,080 and go straight to the syscall itself. 463 00:31:47,580 --> 00:31:48,500 So that's... 464 00:31:48,500 --> 00:31:49,620 It's practically no expense 465 00:31:49,620 --> 00:31:50,920 if you're just doing user stuff. 466 00:31:53,400 --> 00:31:53,960 NameD. 467 00:31:54,080 --> 00:31:56,720 Let's say you're not running nameD as root. 468 00:31:59,400 --> 00:32:01,920 Just a moment on that. 469 00:32:02,080 --> 00:32:04,520 But let's say you're running nameD as root. 470 00:32:07,160 --> 00:32:08,360 And that guy was... 471 00:32:08,360 --> 00:32:09,260 And that guy was cracked. 472 00:32:09,800 --> 00:32:10,560 You had no... 473 00:32:10,560 --> 00:32:13,080 He could not really execute anything else after that. 474 00:32:13,160 --> 00:32:14,800 Maybe nameDex for it would be the only thing 475 00:32:14,800 --> 00:32:15,780 he would be allowed to run. 476 00:32:16,720 --> 00:32:17,800 It would catch that. 477 00:32:19,640 --> 00:32:20,700 With one caveat, 478 00:32:20,940 --> 00:32:23,060 we still have a lot of stuff 479 00:32:23,060 --> 00:32:24,060 that starts up at the beginning. 480 00:32:24,160 --> 00:32:26,200 We're still generating rules for that. 481 00:32:26,660 --> 00:32:29,720 And we're working on handling login 482 00:32:29,720 --> 00:32:33,140 because login will sometimes transition over. 483 00:32:33,220 --> 00:32:34,900 You log in root on console 484 00:32:34,900 --> 00:32:36,180 or login user. 485 00:32:36,700 --> 00:32:39,400 We're playing with how we would handle that guy right now. 486 00:32:39,620 --> 00:32:40,980 That would be one thing that would come out 487 00:32:40,980 --> 00:32:42,300 within the next two, three versions. 488 00:32:44,640 --> 00:32:45,520 The question... 489 00:32:45,520 --> 00:32:45,900 Sorry. 490 00:32:46,440 --> 00:32:47,560 The question was, 491 00:32:48,680 --> 00:32:50,600 what would be the load with running this 492 00:32:51,060 --> 00:32:52,560 with an Apache web server? 493 00:32:54,480 --> 00:32:55,380 Other web servers, 494 00:32:55,480 --> 00:32:59,960 I have run this with Roxen without any problems. 495 00:33:02,100 --> 00:33:04,000 Just running regular CGI's. 496 00:33:06,320 --> 00:33:07,900 Unless I shoot myself in the foot 497 00:33:07,900 --> 00:33:11,220 by making an error in my logic. 498 00:33:12,480 --> 00:33:13,000 Yeah. 499 00:33:21,900 --> 00:33:24,920 We can go with all 500 00:33:24,920 --> 00:33:26,460 with a set of privileges, 501 00:33:26,560 --> 00:33:29,800 which root will always be the superset. 502 00:33:30,940 --> 00:33:32,260 Easier for just development. 503 00:33:32,380 --> 00:33:34,000 Right now it's been root. 504 00:33:34,000 --> 00:33:36,620 Because that's been the parts 505 00:33:36,620 --> 00:33:38,540 where my headache personally came from 506 00:33:38,540 --> 00:33:40,100 which caused me to really want to do this. 507 00:33:40,800 --> 00:33:42,800 I don't like sleeping on machine room floors. 508 00:33:46,200 --> 00:33:47,180 I asked, 509 00:33:47,280 --> 00:33:50,500 why are we just limiting this to root transitions? 510 00:33:53,720 --> 00:33:56,020 Also transitioning just from user to user. 511 00:33:56,220 --> 00:33:59,760 Until you transition into that root user, 512 00:33:59,940 --> 00:34:02,280 you can have your other IDS utilities 513 00:34:02,280 --> 00:34:03,680 running out there as root 514 00:34:03,680 --> 00:34:05,360 with more privilege than that user, 515 00:34:05,620 --> 00:34:08,260 monitoring them, T2I snoop, 516 00:34:08,380 --> 00:34:10,980 other applications, watching logs. 517 00:34:11,300 --> 00:34:14,420 But once they actually acquire that root privilege 518 00:34:14,420 --> 00:34:15,600 and they're in the system, 519 00:34:15,780 --> 00:34:17,480 you can no longer trust that stuff. 520 00:34:17,860 --> 00:34:20,060 So the only thing that has more privilege 521 00:34:20,060 --> 00:34:20,860 than root is kernel. 522 00:34:26,220 --> 00:34:26,840 Anything? 523 00:34:27,340 --> 00:34:27,940 Sorry. 524 00:34:28,740 --> 00:34:29,520 Yes sir. 525 00:34:29,640 --> 00:34:30,180 . 526 00:34:33,700 --> 00:34:34,180 Pardon? 527 00:34:34,940 --> 00:34:35,420 . 528 00:34:38,040 --> 00:34:39,340 SU, well right now, 529 00:34:39,400 --> 00:34:40,140 because of root. 530 00:34:42,000 --> 00:34:43,100 The question is, 531 00:34:43,180 --> 00:34:44,000 if you're using SU, 532 00:34:44,300 --> 00:34:45,820 is there anything to help? 533 00:34:45,880 --> 00:34:47,440 I'm not quite sure if I fully understand 534 00:34:47,440 --> 00:34:49,100 what you're. . 535 00:34:53,600 --> 00:34:54,720 Unfortunately right now, 536 00:34:54,720 --> 00:34:57,560 the SU is a trusted binary. 537 00:34:58,100 --> 00:34:59,160 To keep it more secure. 538 00:34:59,320 --> 00:35:00,400 If SU is, 539 00:35:00,400 --> 00:35:03,240 if you can root SU, 540 00:35:04,480 --> 00:35:05,700 especially on Linux box, 541 00:35:05,860 --> 00:35:06,660 congratulations man, 542 00:35:06,720 --> 00:35:08,220 don't let anyone find out about it. 543 00:35:08,840 --> 00:35:09,360 . 544 00:35:10,500 --> 00:35:12,200 You could own the world. 545 00:35:12,400 --> 00:35:12,920 Literally. 546 00:35:14,320 --> 00:35:14,840 . 547 00:35:16,900 --> 00:35:17,620 But yeah, 548 00:35:18,360 --> 00:35:18,880 sudo, 549 00:35:19,860 --> 00:35:21,200 I do it for convenience. 550 00:35:21,940 --> 00:35:22,820 But really, 551 00:35:22,980 --> 00:35:24,060 SU would be the only one 552 00:35:24,060 --> 00:35:25,240 you really should have in there. 553 00:35:26,140 --> 00:35:28,100 I hope SU is secure. 554 00:35:28,720 --> 00:35:30,620 I hope people have been hacking on it 555 00:35:30,620 --> 00:35:32,100 trying to get it not to be secure enough. 556 00:35:32,580 --> 00:35:33,260 Yes sir, 557 00:35:33,360 --> 00:35:33,980 back in the back. 558 00:35:34,340 --> 00:35:34,820 . 559 00:35:39,280 --> 00:35:40,240 I'm sorry, 560 00:35:40,340 --> 00:35:41,300 the argument itself, 561 00:35:41,480 --> 00:35:42,180 not the inode. 562 00:35:42,520 --> 00:35:44,640 So moving around files on the file system 563 00:35:44,640 --> 00:35:45,540 would not affect it. 564 00:35:46,160 --> 00:35:46,340 . 565 00:35:48,260 --> 00:35:49,060 It's a little bit, 566 00:35:49,180 --> 00:35:51,320 and I think you were probably going towards 567 00:35:51,320 --> 00:35:53,680 the lids project in that question. 568 00:35:54,500 --> 00:35:56,020 We're really not doing ACLs 569 00:35:56,020 --> 00:35:58,080 at any point in time. 570 00:35:58,100 --> 00:35:58,480 . 571 00:36:02,900 --> 00:36:05,340 If could be replaced, 572 00:36:05,640 --> 00:36:05,920 yes. 573 00:36:06,920 --> 00:36:07,380 However, 574 00:36:07,580 --> 00:36:10,820 with the file system set up properly, 575 00:36:10,920 --> 00:36:12,100 it should not be easily replaced 576 00:36:12,100 --> 00:36:14,260 without already having the privilege 577 00:36:14,260 --> 00:36:15,120 which you're trying to acquire. 578 00:36:16,340 --> 00:36:16,800 . 579 00:36:18,640 --> 00:36:19,520 And then again, 580 00:36:19,640 --> 00:36:21,260 if they have physical access to your machine, 581 00:36:21,400 --> 00:36:22,800 you might as well just pack it up and go home. 582 00:36:23,940 --> 00:36:24,400 . 583 00:36:29,100 --> 00:36:29,700 . 584 00:36:30,920 --> 00:36:31,520 . 585 00:36:31,520 --> 00:36:32,300 Pardon, sir. 586 00:36:33,340 --> 00:36:33,940 . 587 00:36:41,060 --> 00:36:43,120 Copy a set UID binary. 588 00:36:43,600 --> 00:36:44,120 . 589 00:36:45,960 --> 00:36:46,560 . 590 00:36:46,560 --> 00:36:46,920 No, 591 00:36:46,980 --> 00:36:49,120 because we're actually looking at the file name 592 00:36:49,120 --> 00:36:51,500 as it's coming in through the exec, 593 00:36:51,580 --> 00:36:53,340 which is the fully qualified path name. 594 00:36:53,340 --> 00:37:03,800 name. Not the argvia0. The guy, we were asking if, for example, you created a user bin under 595 00:37:03,800 --> 00:37:08,900 your home directory and would run su under that, would that be it? Which I think you 596 00:37:08,900 --> 00:37:13,480 were trying to get at. If we were checking slash argvia0, you'd have relative path issues. 597 00:37:19,280 --> 00:37:27,040 I see it's root. Actually, I don't know. I'd have to try that back in the hotel room. 598 00:37:35,920 --> 00:37:41,960 That would be correct. You would not be able to give it UID root privileges. You'd have to have a 599 00:37:41,960 --> 00:37:42,820 collaborating administrator. 600 00:37:46,020 --> 00:37:47,120 Or a negligent one. 601 00:38:00,840 --> 00:38:06,720 Right now, pretty much within a group, just the guys have been beating on it, a few other people. 602 00:38:07,600 --> 00:38:10,420 I'd like to see what people could do to it. Yes, sir, right in the back. 603 00:38:11,120 --> 00:38:13,360 I'd like to know if the machine is going to issue a... 604 00:38:30,320 --> 00:38:36,320 The question was if NARC was loaded prior to this module actually being loaded onto this system, 605 00:38:36,380 --> 00:38:38,080 would it be able to detect the root transitions? 606 00:38:43,360 --> 00:38:48,840 If you tried to execute something, like let's say an LS or just a command through the system, 607 00:38:50,240 --> 00:38:59,540 it would catch that. Just any Trojan binary, just say anything, not even that guy. 608 00:39:00,660 --> 00:39:09,420 If he did not have to call exec up to that point, it would not go through the reference monitor 609 00:39:09,420 --> 00:39:12,620 to be stopped or permitted through. 610 00:39:15,720 --> 00:39:16,540 Yes, ma'am. 611 00:39:17,220 --> 00:39:20,780 If NARC is excluded, what happens to the SMP? 612 00:39:22,100 --> 00:39:31,480 Yeah, right now, well, the question is why, as a symmetrical multiprocessor box has been excluded at this point. 613 00:39:31,560 --> 00:39:37,020 At this point, we are not handling spin locks within the code, so race conditions probably would occur. 614 00:39:38,000 --> 00:39:42,700 That is something else to be going into. First, we need to get a good SMP box. 615 00:39:45,340 --> 00:39:50,520 Yes, ma'am. 616 00:39:51,380 --> 00:39:52,080 Yes, sir. 617 00:40:02,080 --> 00:40:04,840 Could you repeat that a little bit louder? 618 00:40:05,180 --> 00:40:05,580 Yes, sir. 619 00:40:06,480 --> 00:40:07,240 Yes, sir. 620 00:40:07,960 --> 00:40:12,260 Yes, sir. 621 00:40:14,560 --> 00:40:15,480 We're not using 622 00:40:15,480 --> 00:40:17,360 Let me just go into that 623 00:40:17,360 --> 00:40:18,400 and I'll show you 624 00:40:19,160 --> 00:40:19,880 Where is that? 625 00:40:22,160 --> 00:40:23,480 He's questioning if you modified 626 00:40:23,480 --> 00:40:25,420 argv of 0 to point to a 627 00:40:25,420 --> 00:40:27,380 legitimate file, would it be able 628 00:40:27,380 --> 00:40:27,760 to 629 00:40:29,640 --> 00:40:31,340 bypass it? And no 630 00:40:31,340 --> 00:40:33,520 that was one that actually came up earlier on 631 00:40:34,220 --> 00:40:35,180 in the testing 632 00:40:35,180 --> 00:40:35,940 What is it? 633 00:40:36,680 --> 00:40:37,760 Try s calls 634 00:40:44,460 --> 00:40:45,140 We're not 635 00:40:45,140 --> 00:40:45,520 using 636 00:40:45,520 --> 00:40:49,120 the file name that actually comes in 637 00:40:49,120 --> 00:40:51,100 through the exec statement 638 00:40:51,100 --> 00:40:52,560 which is really what is executed 639 00:40:53,740 --> 00:40:55,160 That's what we're using for it 640 00:40:55,160 --> 00:40:56,480 to figure what you're going to run out 641 00:40:56,480 --> 00:40:57,620 Yes sir 642 00:41:04,560 --> 00:41:06,320 It happened to be 643 00:41:06,320 --> 00:41:07,680 a basic issue 644 00:41:12,340 --> 00:41:14,940 If it is a buffer 645 00:41:14,940 --> 00:41:15,200 overflow 646 00:41:21,060 --> 00:41:22,740 That is 647 00:41:22,740 --> 00:41:23,340 That is 648 00:41:27,260 --> 00:41:28,940 This guy 649 00:41:28,940 --> 00:41:37,000 Is there a Sean Hedges 650 00:41:37,000 --> 00:41:37,500 in this room? 651 00:41:37,680 --> 00:41:39,580 Sean Hedges? 652 00:41:40,280 --> 00:41:41,120 Okay 653 00:41:41,120 --> 00:41:42,620 Sorry 654 00:41:43,540 --> 00:41:45,800 Could you repeat for me? 655 00:41:46,340 --> 00:41:47,380 Let's use 656 00:41:47,380 --> 00:41:48,900 the example of 657 00:41:49,480 --> 00:41:49,900 a 658 00:41:49,900 --> 00:41:49,960 a 659 00:41:49,960 --> 00:41:50,960 a 660 00:41:50,960 --> 00:41:51,740 a 661 00:41:53,540 --> 00:41:54,380 a 662 00:41:54,380 --> 00:41:55,100 a 663 00:41:55,100 --> 00:41:55,380 a 664 00:41:55,380 --> 00:41:56,020 a 665 00:41:56,020 --> 00:41:56,040 a 666 00:41:56,040 --> 00:41:56,100 a 667 00:41:56,100 --> 00:41:56,580 a 668 00:41:57,600 --> 00:41:58,440 a 669 00:41:58,440 --> 00:41:59,140 a 670 00:41:59,140 --> 00:41:59,340 a 671 00:41:59,340 --> 00:41:59,360 a 672 00:41:59,360 --> 00:41:59,380 a 673 00:41:59,380 --> 00:41:59,460 a 674 00:41:59,460 --> 00:41:59,520 a 675 00:42:06,820 --> 00:42:07,660 a 676 00:42:10,520 --> 00:42:18,940 the memory that's been overwritten is on the stack at that point in time 677 00:42:18,940 --> 00:42:21,880 You're not in the kernel memory at that point 678 00:42:21,880 --> 00:42:23,800 You're still actually in user space 679 00:42:25,240 --> 00:42:29,180 We're trying to terminate the process at that point 680 00:42:29,180 --> 00:42:30,380 called exit the process 681 00:42:30,380 --> 00:42:33,580 So we're literally just destroying the fending application 682 00:42:33,580 --> 00:42:34,960 because after that buffer overflow 683 00:42:34,960 --> 00:42:37,160 and we deny the exec 684 00:42:38,920 --> 00:42:40,900 it's nondeterministic what will happen 685 00:42:40,900 --> 00:42:41,980 So with some of that 686 00:42:41,980 --> 00:42:46,000 it's actually bringing it to the stack space 687 00:42:46,000 --> 00:42:48,560 but then it does execute or it doesn't execute? 688 00:42:48,640 --> 00:42:50,420 The shellcode will execute 689 00:42:50,420 --> 00:42:51,940 on the buffer overflow 690 00:42:51,940 --> 00:42:54,420 It stops it at the exec itself 691 00:42:54,420 --> 00:42:55,540 Okay so 692 00:42:57,200 --> 00:42:58,480 I'm trying to say something 693 00:42:58,480 --> 00:43:00,420 In that case, wouldn't it be possible to replace 694 00:43:00,420 --> 00:43:02,200 the normal shellcode 695 00:43:02,200 --> 00:43:04,400 with something that would just download this module 696 00:43:04,400 --> 00:43:06,560 and then run 697 00:43:07,160 --> 00:43:09,420 the same exploit with 698 00:43:09,420 --> 00:43:11,420 You call the syscalls 699 00:43:11,420 --> 00:43:11,880 Yes 700 00:43:11,880 --> 00:43:14,380 In normal production you would not have 701 00:43:14,380 --> 00:43:15,860 the unloading of the module 702 00:43:15,860 --> 00:43:18,940 We would be overriding actually replacing the syscalls 703 00:43:18,940 --> 00:43:20,500 for loading and unloading the module 704 00:43:20,500 --> 00:43:22,800 or you would have to go through an attack KMAM 705 00:43:22,800 --> 00:43:23,920 at that point which 706 00:43:26,380 --> 00:43:27,200 Yes sir 707 00:43:27,200 --> 00:43:28,720 So then 708 00:43:28,720 --> 00:43:30,300 you've got to face the 709 00:43:30,300 --> 00:43:32,660 right model 710 00:43:32,660 --> 00:43:34,860 of a shell into a 711 00:43:34,860 --> 00:43:37,140 that shell will keep up with that module 712 00:43:37,160 --> 00:43:39,060 and then you have to run 713 00:43:39,060 --> 00:43:39,420 the actual shell 714 00:43:39,420 --> 00:43:45,520 to run the actual shell 715 00:43:45,520 --> 00:43:47,820 not the exec calls 716 00:43:47,820 --> 00:43:48,060 to run the actual shell 717 00:43:48,060 --> 00:43:49,880 If you've got enough space in the buffer 718 00:43:49,880 --> 00:43:54,040 that you can write the limit shell 719 00:43:54,040 --> 00:43:54,660 that you can write the limit shell 720 00:43:54,660 --> 00:43:56,640 as opposed to the time 721 00:43:57,160 --> 00:43:59,040 The question is 722 00:43:59,040 --> 00:44:01,100 if you could actually just write a shell in the buffer 723 00:44:01,100 --> 00:44:03,080 That was actually not the attack that we have 724 00:44:03,660 --> 00:44:05,540 recently been actually looking at 725 00:44:05,540 --> 00:44:06,720 such as 726 00:44:07,160 --> 00:44:08,540 not so much writing a shell but writing 727 00:44:08,540 --> 00:44:10,300 what you want to occur within the attack 728 00:44:10,300 --> 00:44:11,640 within it through say 729 00:44:11,640 --> 00:44:13,400 just to give you an example 730 00:44:13,400 --> 00:44:16,000 one that we're trying to work on now is 731 00:44:16,000 --> 00:44:17,840 handling you call open 732 00:44:18,480 --> 00:44:20,520 open etc password in write mode 733 00:44:20,960 --> 00:44:22,720 write out a new line close the file 734 00:44:22,720 --> 00:44:24,140 probably even take up less space 735 00:44:24,140 --> 00:44:25,520 than what you're probably shooting at 736 00:44:26,280 --> 00:44:28,660 which point that's where you bring in other applications 737 00:44:28,660 --> 00:44:30,200 not a silver bullet 738 00:44:30,920 --> 00:44:32,680 things like lids where you actually be 739 00:44:32,680 --> 00:44:34,560 watching and protecting these files 740 00:44:38,440 --> 00:44:39,060 Yes sir 741 00:44:53,340 --> 00:44:54,960 That would be something that we 742 00:44:54,960 --> 00:44:56,640 would be doing actually in an external 743 00:44:57,040 --> 00:44:57,280 application 744 00:44:58,880 --> 00:44:59,600 I'm sorry 745 00:45:01,720 --> 00:45:02,200 Pardon 746 00:45:10,640 --> 00:45:12,400 I actually would have to copy 747 00:45:12,400 --> 00:45:13,840 you would copy the binary over 748 00:45:13,840 --> 00:45:14,360 Yes 749 00:45:14,360 --> 00:45:15,480 Yes but that's 750 00:45:15,480 --> 00:45:16,500 you would be wanting to 751 00:45:17,980 --> 00:45:20,100 you'd be using applications like lids 752 00:45:20,100 --> 00:45:21,380 where you would be protecting the files 753 00:45:21,380 --> 00:45:23,360 themselves your read file systems 754 00:45:23,360 --> 00:45:23,800 Yes 755 00:45:35,360 --> 00:45:35,880 And 756 00:45:37,160 --> 00:45:37,980 with it is 757 00:45:37,980 --> 00:45:40,980 1046 so if there are any other questions 758 00:45:44,760 --> 00:45:46,480 I thank you for coming