Today I will talk about these several sections. The first one will talk about the background of the leads and what kinds of leads we build here and the architecture and then the implementation issues. And then I will talk about what kind of attack and what kind of defense leads can provide. Finally, I will talk about how to secure the Linux kernel with the leads and then a summary. And if any one of you have any questions during my talk, you can just raise your hand. I can answer the question in the middle. All right. Let's begin. Is that attacks and defenses that LIDS mitigates or against LIDS? Yes. All right. There are attacks against LIDS and attacks against the system. They are both. So will you be talking about... Yeah, yeah. I will talk about the attack to the LIDS and the attack to the kernel and the attack to the system that LIDS can provide, what kind of measures that can prevent this attack. Okay. So will you be talking about attacks against LIDS? Yes. If I have a system that has LIDS on it? Yes. Okay. Thank you. Thank you. All right. Here's the background. And I will talk about very quickly about this background kind of things. The very first one we talk about is the programs and... Okay. The problems and current solutions to this problem. We face these internet ages and... But we have seen a lot of host being hacked. And defaced. And all the information being leaked and stolen kind of things. And there are lots of wounds and viruses spreading about this world. Like the COVID and the Minda kind of things. And there are lots of vulnerabilities found every day. Even the very secure software like OpenSSH and Apache. Recently they found a very serious bug. So what kind of problem that we have made this program? Made this problem occur? Even we have used some of the secure software like OpenSSH and OpenSSL kind of things. But we cannot prevent all of these problems. The reason for this is that the application software right now are not trustworthy. Because more and more complicated implementation. Because you have to meet the customer's requirements. And you have to add more features to this software. And the software became more and more complicated. And you cannot avoid any... You cannot avoid the bug in the software. So the application software is not trustworthy. So you have to find a way to make this application. This untrustworthy application software became secure. And the kernel is not trustworthy. It means that I can just insert modules into the Linux kernel. And I can intercept all the system calls. And I can do whatever things I want to do. Even if the application software is secure. And the third one is access control is not perfect. It means that right now, being a root or super user, you can do anything you want. You become a god in the system. So you can... If you can file a remote exploit code or use the local exploit. And you can become a root. And you can do anything you want. So it's not perfect right now with the access control. Okay. The solution right here with our solution is we need the trusted kernel. This kernel can protect the kernel itself. It means that nobody can modify the kernel. Nobody can intercept the system call. Nobody can change it. And also this kernel would also provide this MAC. MAC is mandatory access control. And this MAC is not... It's different from what we have used in the Unix environment right now. And it is... It means that no one can change the MAC rules. But somebody can change the rules that right now the Unix environment uses. For example, you can change the file. You can use change more to change the file to... You can just say change... Somebody... Everybody can read it or everybody can write it. Right? But as a root, you can change anything. So this is not very secure. But with the MAC, with the mandatory access control, no one can change these rules even if as a root or super user. And with this MAC, you can implement the least privileged rules. It means that if... For example, for the ETC password. This file contains all the passwords in this file. Right now, everybody can read it. Because you need to read the password for the user to log in. But after logging in, this file is not... It's not usable to the users. So you can just make the login program to read this password file. And nobody can read it right now. So it means that nobody can read this ETC password except the login program. Right now, the least privileged can implement with this mandatory access control. All right. The history of the least... Just from the... It's about two years... About three years projects. And we have... A lot of developers to help this project. I expect... Especially the core developer, Phillip Bondy. He'll be here, I guess. And he had a talk yesterday. And also, we have an FAQ maintainer, Steve Bremer. And I guess he'll be... He'll also be dev content. And there's another FAQ maintainer, Sandy Cray. All of these people have the least projects to be growing. And we have add capability rules. And likewise, Mac in the 2000... And... Before... In match of this year, we have also add LSM-based variants. LSM is a Linux security module. And will be added to the kernel 2.5 right now. I guess maybe in the next one or two months. All the... All these LSM or Linux security modules will be added in the kernel. All these LSM or Linux security modules will be added in the kernel. All these LSM or Linux security modules will be added in the kernel. And we just talk about the background. And next, we talk about architecture that LIDL is based on. The architecture here... There's a map here. All right. LIDL contains several components. The core one is this access control models. And it contain the access control database. And it contain the... And it contain the... And it contain the... An administration interface. And it contain a whole checking centers. And when a user program... Then a user program... There's no... When a user program begin to exactly in the system, he will fork. And he will use the fork and execv. This exactly v to... To executing. Right now, the access control database will attach the access control list to the process and when he tries to access something, the leads will check with the access database and then to determine if he can let this access continue or not. And we have divided the system into two categories. The one is subject and the other is object. And we place a checking between this subject and object. The subject is a process and the object is all kinds of resources such as file, device, and all kinds of things. Things that the process would like to access. And we have a lock to lock everything that maybe is related to the security. We have also an administration interface that can manipulate the access control database. The features with the leads is that leads is a kernel patch. It's a Linux kernel patch. Maybe in the future, it will be the Linux security kernel modules. And he's... He implemented a trusty kernel and he had the LiteWire Mac in the kernel and he had the admin tools. He include... These admin tools use the IP chain's likely use that is maybe easier to use for the users. And here we show an example. Wow, it's not very clear. Say if you have logged into a system, you get... You use the local exploit code or remote exploit code to get a root. And right now, you want to try to get the shadow or get the password file. Right now, it does do a cat etc shadow at the very first line. And then, before that, as a root, you can do anything. So you can see the shadow file. You can see all the contents. But right now, you can just... The system will return as operation not permitted. You cannot... You cannot see the shadow file. You cannot cat the shadow file right now with the lits. And from the log, the lits will tell that somebody and with the UID, what kind of UID, GID, and what kinds of program try to access this shadow file. And just another example is if you try to insert something, insert a module into the kernel, maybe use the root case, some kind of root case, and right now the lits will tell you that operation is not permitted, even if you use a root. And just talk about architecture. And next, we talk about the implementation. Do you have any questions about this section? No? Okay. Let's continue. All right. So lits actually include several components. And include... Enable to... In order to implement these components, we have several very important structures. Here, the very first one is secure. I know this one is a global access control list. It means that everybody and any resource need to use this... Need to check this ACL first. And we... And there's a lits sys ACL also in the kernel. And this structure apply to individual process. It means that every process in the kernel got this lits sys ACL. It include all the rules, all the privileges that this process can got. And all these structures got the... Two significant... Significant structure here is... I don't know. This is I know number and the DV number. This I know number and DV number identify a single file name or directory name or the device name kind of things. And we have also capabilities. And we have also the... All the ACL that this process contain. And this is a task structure in the Linux kernel. This task structure is when the process is in a kernel, this process has a task structure and only task structure to identify this process. And we have, for the lits, we add one, we have add a pointer in this task structure with the lits sys ACL. This means that when the process running under the lits LFS control, he would got this lits sys ACL structures. And he would have this ACL, this structure would told him that what kinds of access or control lits that this process got. And what kinds of things he can do or he cannot do. And here we just go into the program and see when you do a fork in Linux, in the program, and what lits do is he would inherit all the access control lits, all the access ACL from his parents. And you can see when you do a fork, we have the copy lits sys ACL, this function to copy everything from the parents. And after you do a fork, maybe you can, you would do an exe cve to actually execute this program. And from when you do the exe cve, we have lits set ACLs to set all the ACL that he gets from this program. So when a program is in a system, he would got two ACL. One is inherit from his parents, another one is get from his cell. For example, if a program in ABC program, this program got, had the privilege to read password file. But you use another program to execute this program. The other program is his parents. He got, when this ABC running, he got the privileges, he got the ACL from his parents, and also he would got the ACLs from his cell, from his parents. The ACLs that he got. And after we have all the checking and all the process attaching kind of things, right now, we will see a system call that we have the checkpoint. For example, there is so in the trans-mode, when you use the HMOD, this system call we have, we have intercept, we have adding this checking in this system call in the kernel. You can see that this is if the red line one, we add if lits check base. When this function do is he would check all, everything that this program got, and he would check, he would make sure that if this process had the privilege to do the trans-mode to the destination file. And if he's, he do not get this privilege, he would, we have the log here, lits security alert, and he would log everything that attempt to do this trans-mode. And here we say, we say this function lits check base, here we have this lits check base function. And this function is do is checking all the ACL database to see if this, if this first you check, if the destination file, you can change the, if anybody can change the destination file. If not, he would check if the program try to do the CHMOD, the trans-mode, had the privilege to do the trans-mode to the, to this destination file. If he's not, he would just deny it and just return. All right, anybody have question about this section? No? All right. Just now we just talk about implementation issues. Actually, all this implementation kind of things, we have the how to, but it's kind of obsolete. So, I guess maybe in the future, I will write another how to to talk about this implementation issues. And next one, we talk about the attack and defense with the lits. The very first one is we will attack, we will attack the lits and the main password. In the lits, we have, we have super user, right? The super user cannot do the things that he can do before. So, but in order to admin all kinds of this access, this control, you have to got the super, super users that he can do the privilege, he can do everything that the root can do before. In order to become this super, super user, you have to got a password. This password is installed in the kernel. So, somebody will say that if I can get the password, I can do anything, right? But this password, we have several defenses. The first one is this password is 160, 160 bits and defines how to guest. And another one, the second one is the most important one that we have the restricted login TTY. It means that even if you got, you know the password, if you just log in from the remote host, maybe you, you get a remote expert call, you get a root from the remote side. But right now, even if you know the password, you cannot just become this super, super user because we check the TTY. We check if you just log in from local or log in from remote side or log in from a serious port. We can define these restrictions when you compile the kernel. And there's another way to modify the kernel's structure, the kernel's data. It's, it's use the, the road's I.O., the road devices just write, maybe modify the hard disk through the I.O.'s operations. But right now, all the I.O. operation is controlled by this cap, this road's I.O. capability. This capability has been disabled by default. So if you want to use, if you want to change the kernel by this DVK memory or DVK code, you cannot just write to these devices because this cap, this road I.O. has been disabled. The second one we show that there's a lot of trojan, a lot of leakage and sensitive information leaking in this current years. The tag is included, the trojans, the first trojan, if I can log in the system, I can modify this bin log in and I put the trojans in this program and next time, when I log in, I will not use the password, right? And the log clean, maybe I just, we clean all the log because they will lock something in the, in this log directory. And we have the password, you can just store the password, etc, you can just do phpcshadow file and you can use the other password cracking tools to crack it. And for the modules, you can insert or or remove the modules from the kernel and you can just say insert some UK respirator in the kernel and you can modify the system call. And if lots of efficiency that can help you to hide your process to hide your file, but the defense by the said One of our ideas is that we can use file system protection first. This file system protection is implemented as the leads and is in the VFS layer, it's a virtual file system layer. And you have the read-only, you can set a file to only read-only that nobody can just write to it. For example, for this bin login, you can just set a rules that made the login to read-only. And in this case, nobody can write to it, nobody can change it. And for the log, you can just set it to append. So every log can append to this log file, but you cannot write to it. And there's another mode, it's deny access. You can just set the file to deny access. It means that nobody can see this file when he do the LIS. Just modify this file. The example for this deny access is that you can set the ETC shadow as a hidden file, so nobody can see it. And the modules operation, you can prevent, insert more, or remove modules from the kernel before, if you are root. But right now, because all the modules operation is controlled by this cap, sysmodules. This module has been disabled by default, by the LIS. So you cannot do anything to the modules right now. We saw a log here, and when you do the insert mode, and the LIS, we saw there's a log here. It means that we saw that which person and valid this cap system modules. So you can increase the kernel security. Like this way. And the next one is LD, this load, LD preload, this one, this LD preload can insert the malicious code in a process when this program runs. So in this case, if this program get privilege from the leads. And I can just compile a preload library, and I can just insert this library. I can use preload, LD preload, and run with this privilege program. And because this privilege program, maybe he can read the password file, right now, I can write this library with the LD preload. And I can do anything as this privilege program. This bug is discovered by the TESOL team in the early this year. And we have a solution is that we check the LD in the environment p. Because all the LD preloads is in the environment pointer. You can just check one by one. And we just check this LD and underscore. And we check if there's any LD kind of things. When the program is executed, we just clear all the ACL. So it means that you can still use LD preload, but you cannot get the ACL, the leads ACL. So in this case, we've made the system more usable and more secure. Another one is that we have also a very light white circle detection. See in the corner. You know, a lot of local exploit code, we use the shell code to get a shell. And this shell code, we provide as parameters to the program, or as an environment to this program. And what we defense is we check the shell code, it's very easy, we just check some of the keys of the shell code in the environment p, or the arguments in the environment, or the argument c. In this way, we can prevent shell code in parameters and environments. Some of the examples is that I just run this xlock exploit code. You can find this one on the internet. And it's very easy. And when leads is on, when I run this exploit code, the local exploit code, and leads can find it. And he will say the shell code detected when exactly this file and program terminated. It means that when the program is running with the shell code in the parameters, or in the environment, leads can just terminate this program and the local exploit code. We can... In this way, we can prevent... We can prevent some of the... We can prevent some of the... We can prevent some of the... Exploit code, but it's not all of them, because if the shell code... Because we just check a piece of the shell code, just like if you... Just like the system call kind of things. The next attack is dynamic runtime kernel modification. This attack... This attack you can find in Freq magazines, 58 is a very recent one. And you can... They provide a message to modify the kernel code through this kcodes, or this dvk memory. And he can modify the kernels one time, state of the data. In order to do this, he had to write to this program. Right. He had to write to this proxy kcode, this file, and all this dvk memory, he had to... Had the ability to write. So right now, the leads... What leads can do is, he can defend it just by this... We have talked about it, just by this cat-sys-row-io. This row-io is the capability that he had disabled by before. He'd control everything to access... Access to this row-io file. Include the... The hard disk, include all the drivers, all the row-io devices. And we have the... So the log here, as example here, is that when you're trying to do this, write to this kdvk memory, the leads will terminate the system call, and return an arrow, and log this operation. Say you have... You have violated this cat-sys-row-io. So... You can prevent this kind of attack. All right, we just talked about the tech and the defenses with the leads. And next, we talk about this... How to build a secure Linux with leads is... All this information you can find on the... On our website. It's www.lids.org. But right now, it's... And... You can... You can get all the FAQ and all the how-to on the websites. First of all, you need to get a vanilla kernel from the www.kernel.org, or in its mirror. A lot of people just send email to me, say, why I cannot use Red Hat's kernel to patch, because we do not support Red Hat's kernel. Because... We... We... We... We don't support the... We don't support the vanilla kernel. It's easier for us to maintain it. So, you have to download a kernel from the... From this website and you need to kernel... After you do that, you can download the kernel patch out... It's kernel patch from our website and all the tools. And if you want to use Linux security modules, you can just go to this lsm.innunix.org. And after that, you can just... After you... You tar... You untar this kernels... Kernel... kernel source, you can do the patch, use the patch program to patch with our patch, with these leads, and yes, the last one. After we patch the leads with the vanilla kernel, you can do, we configure the kernel, you have to make, use make, menu, config, s, configure, config to reconfigure the kernel. There are several options in the kernel, in the leads, and you can define, you can decide if you want to use it. And after that, you can rebuild the kernel, and just install the kernel, and compile, and install all the lead tools, including these leads, the main tools, and the leads com tools, and we have the default ACL setting, by default, but maybe you need to do, add the new ACL by yourself. There are several directories, important directories. For leads, the very first one is etc, leads, this directory includes all the leads.com, leads.mail, and leads.pw file. This file will be read when the kernel blew up, and you read everything in the kernel. And this directory is protected by leads, but default. You say you cannot go into this directory, you cannot change this directory, anything you cannot. You cannot do this, you cannot do anything to this directory if you are not a super, super user. And there's a tool, leads.conf, this tool is used to manipulate the access control list. You can just say, leads.conf, I need a program, this is a subject, the program, I want this program can read a file, or write a file. It's a dash O, it's an object, and you can just say there's several options here, and you can also use the leads.conf to configure the capability, and with this, it has a level kind of things. The leads admin is used to do some administration tasks. For example, if you want to enable or disable leads on the machine, you can just log in and do this. This leads.s and dash leads, you need to provide a password, and then the leads can be disabled. And you need to, this dash I is to seal the kernel. This seal the kernel means that after I stop everything, I need a program, I need a SSD kind of things. After I do everything, I stop, I finish, stop. The machine, and I do this dash I, and I can seal the kernel, and right now the kernel is unbreakable. You cannot insert a module, you cannot do anything to the kernel, except right now. There's a very good FAQ in our website, anything contain the pro, maybe if you have any questions, you can just check this FAQ first. Thank you. Right now we have, after you install the leads, you have, right now we can see some testing. All right. After we build the system, you seal the kernel, you do the more prop leads, if you have used leads as modules, and you do the leads dash I, this means that you have sealed the kernel. And from the log, you can see Linux intrusion detection system started, and how many objects, and how many source ACL, and how many objects are in this access control list database. And you can do the CAT ETC shadow, you can see that the operation is not permitted. You cannot see the shadow password right now. And if you want to touch ABC in the BIM directory, you can see that operation is not permitted. And if you want to remove the modules of the leads, you can see that operation is not permitted. You can do anything. You cannot do... You cannot do... You can do nothing to these kernels right now. The log, we saw that somebody, the PID and the UID, what kinds of users, and what kind of process he used to violate this program, to violate this CAP system modules. And finally, we have a summary. Okay. The leads project actually is a free software. We have... This is... This leads is under the GPL, and we developed this one for free, and we do not have any support right now. All these things is by interest, and I can... I have to thank many people, because without them, there's no any... Leads cannot go too far right now. And the leads actually is implemented as security modules. And the modules in the kernel, because we talk about in architecture, we show the attack and defense. It means that leads can enhance the Linux kernel security in some efforts. Finally, I want to acknowledge you, and you taking time to listen to this speech, and I want to thank the leads users and developers, especially the Philip and the Steve, and all the... All these users here. And I also want to thank the wonderful world of the free software. With the free software, you can do a lot of things. You can get anything you want from the internet. If you do not like it, you can just modify it, so you have all the rights. But with the commercial one, you have to pay, and you cannot do something you want to do. So I just... This is the wonderful world of free software. With the free software... With the free support, we can develop very interesting tools to enhance our kernel. And I want to thank my employer, Intruder Network, which sponsored this trip for me, and finally, I want to thank StepCon to provide the opportunity for me to present this leads here. All right. Any questions? Thanks. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Any question? Oh. How do you deem the Linux distributions expressing any notice in programming when lists in their distribution? There's one distribution already include leads. There's engage this distribution. You can find it on www.linux. мат 3.3ieds.com. there's a website and there's a distribution made by this company. Integration into the Linux Kernel? Is there any, is it being proposed? Oh yeah, in the Linux Kernel, the Linux Security modules will go into the Linux Kernel maybe in one or two months, but as modules, maybe we go into the kernel in the future, but I don't know if the, I guess I will supply this kernel that leads to the Linux, but I don't know if he would accept it. Has he commented? No, I don't think so right now. Can you comment on the performance state? What? Any decrease in performance? Any decrease on the performance, right? Yeah, apparently whenever you call syscall, you are checking some conditions. Yes. And that's open now. Yeah. For performance, frankly I never, I never checked the performance on this list before, but somebody on the mail list told me that he had used the server with the lead support and he never saw any performance down in any case. So I guess, even if, because the, I do not check every system call. For example, when you open a file, I just check. When you open a file, if you read or write a file, I do not check it. I just check at the very first checkpoint. Syscall? Syscall? Yeah, yeah, yeah. Open. Yes, I just check the sys opened. I do not check sys read or sys write. So I guess this will improve the performance. Another question. Can you verify the integrity of the kernel after it's been attacked? So, can you detect? Let's say somebody attacked your kernel. Yes. By some unknown method. Uh-huh. Right? Yes. Can you verify the integrity of the kernel? All right. If the lead found somebody trying to attack the kernel, he would, okay, attack the kernel has several methods. The first one is you use modules. And the second one, you use the row IOs. And so, right now, all these things have been checked by the leads. So, in this case, if leads found somebody trying to do things like that, to insert modules kind of things, he would provide information in a log, just told that who used what kind of tools to insert or to do what kind of things. So, in this case, after leads found this one, he would terminate. All the operations that this program do. So, he will not affect the kernel, his cell. In this case, he can protect the Linux kernel. So, in this case, I guess the integrity could be guaranteed. I see. So, you just block the known vectors. Yes. Rather than try to verify integrity afterwards. Yeah, yeah, yeah. I just turn, everything is just terminated, all this process. Okay. Sure. And, no? Okay. Let's finish this. Thanks for taking your time here. Thanks.