<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-1437382765045043018</id><updated>2009-08-02T23:14:43.777-04:00</updated><title type='text'>8ciphers</title><subtitle type='html'>g at 8ciphers dot com</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://8ciphers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1437382765045043018/posts/default'/><link rel='alternate' type='text/html' href='http://8ciphers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gian G. Spicuzza</name><uri>http://www.blogger.com/profile/07116472399242056341</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1437382765045043018.post-2720370360245015255</id><published>2007-12-20T15:18:00.000-05:00</published><updated>2007-12-20T15:20:28.970-05:00</updated><title type='text'>A Quick and Dirty Guide To Kernel Hardening with GrSecurity</title><content type='html'>The combination of the Linux kernel and GNU packages has always been regarded as a secure operating system, but can it be more secure? Kernel hardening is the answer to tightening up the Linux backbone. GrSecurity, a kernel patch for Linux, is one of the more popular approaches. After applying this patch and compiling a fresh kernel, your system will have a plethora of new security features.&lt;br /&gt;&lt;br /&gt;The most significant feature is the addition of a role-based access control system (RBAC) that monitors what each user can execute based on their role and denies execution if they overstep their pre-defined rules. Other useful features include ip-based rules, extensive chroot restrictions, address space modification restrictions (PaX), auditing/logging features and /proc and dmesg anti-leak features. A full feature list can be found at the Grsecurity homepage.&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-size:100%;"&gt;&lt;b&gt;Installing Grsecurity:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  First we need to download the Linux kernel and Grsec patch.&lt;br /&gt; &lt;blockquote&gt;&lt;i&gt; $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.gz&lt;br /&gt;$ wget http://grsecurity.net/grsecurity-2.1.10-2.6.19.2-200701222307.patch.gz &lt;/i&gt;&lt;/blockquote&gt;  For your convenience, the PGP keys are located at:&lt;br /&gt;&lt;br /&gt;   http://GRSecurity.net/spender-gpg-key.asc&lt;br /&gt;&lt;a hrefl="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.gz.sign"&gt;http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.gz.sign&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  Move the kernel and patch into the /usr/src directory.&lt;br /&gt;&lt;br /&gt; &lt;blockquote&gt;&lt;i&gt; $ su -c “cp linux-2.6* /usr/src; cp grsec* /usr/src”&lt;/i&gt; &lt;/blockquote&gt;   Extract the kernel and patch (you need to be in root since you're working in /usr/src).&lt;br /&gt;  &lt;blockquote&gt;&lt;i&gt; $ su&lt;br /&gt;# tar zxvf linux-2.6.19.2.tar.gz&lt;br /&gt;# gunzip grsecurity-2.1.10-2.6.19.2-200701222307.patch.gz&lt;br /&gt;# patch -p0 &lt; grsecurity-2.1.10-2.6.19.2-200701222307.patch&lt;br /&gt;&lt;/i&gt;&lt;/blockquote&gt;   Start with the kernel configuration.&lt;br /&gt; &lt;blockquote&gt;&lt;i&gt;  # make clean&lt;br /&gt;# make mrproper&lt;br /&gt;# make menuconfig &lt;/i&gt; &lt;/blockquote&gt; Choose all of the options that are required for your hardware, or use “make oldconfig” and se an old configuration file. When you arrive at the “GRSECURITY” section, enable it by hitting the spacebar. You are now prompted with an array of security features. Building a custom scheme is as easy as selecting a few features, or select a pre-defined security level based on your needs. Taylor Merry created a fantastic list that shows what each level of security provides. His table is listed below:&lt;br /&gt;&lt;br /&gt;  &lt;b&gt;Low Security:&lt;/b&gt;&lt;br /&gt; &lt;ul&gt;&lt;li&gt;linking restrictions&lt;/li&gt;&lt;li&gt;fifo restrictions&lt;/li&gt;&lt;li&gt;random pids&lt;/li&gt;&lt;li&gt;enforcing nproc on execve()&lt;/li&gt;&lt;li&gt;restricted dmesg&lt;/li&gt;&lt;li&gt;random ip ids&lt;/li&gt;&lt;li&gt;enforced chdir("/") on chroot&lt; /li&gt; &lt;/li&gt;&lt;/ul&gt; &lt;br /&gt;  &lt;b&gt;Medium Security (includes all of the Low Security options):&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;random tcp source ports&lt;/li&gt;&lt;li&gt;altered ping ids&lt;/li&gt;&lt;li&gt;failed fork logging&lt;/li&gt;&lt;li&gt;time change logging&lt;/li&gt;&lt;li&gt;signal logging&lt;/li&gt;&lt;li&gt;deny mounts in chroot&lt;/li&gt;&lt;li&gt;deny double chrooting&lt;/li&gt;&lt;li&gt;deny sysctl writes in chroot&lt;/li&gt;&lt;li&gt;deny mknod in chroot&lt;/li&gt;&lt;li&gt;deny access to abstract AF_UNIX sockets out of chroot&lt;/li&gt;&lt;li&gt;deny pivot_root in chroot&lt;/li&gt;&lt;li&gt;denied writes of /dev/kmem, /dev/mem, and /dev/port• /proc restrictions with special gid set to 10 (usually wheel)&lt;/li&gt;&lt;li&gt;address space layout randomization&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;  &lt;b&gt;High Security (includes all of the Low and Medium Security options):&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;additional /proc restrictions&lt;/li&gt;&lt;li&gt;chmod restrictions in chroot&lt;/li&gt;&lt;li&gt;no signals, ptrace, or viewing processes outside of chroot&lt;/li&gt;&lt;li&gt;capability restrictions in chroot&lt;/li&gt;&lt;li&gt;deny fchdir out of chroot&lt;/li&gt;&lt;li&gt;priority restrictions in chroot&lt;/li&gt;&lt;li&gt;segmentation-based implementation of PaX&lt;/li&gt;&lt;li&gt;mprotect restrictions&lt;/li&gt;&lt;li&gt;removal of /proc/&lt;pid&gt;/[maps|mem]&lt;/pid&gt;&lt;/li&gt;&lt;li&gt;kernel stack randomization&lt;/li&gt;&lt;li&gt;mount/unmount/remount logging&lt;/li&gt;&lt;li&gt;kernel symbol hiding(18)&lt;/li&gt;&lt;/ul&gt;   Outside of the options in these categories are a few additional options that can be  enabled manually:&lt;br /&gt; &lt;ul&gt;&lt;li&gt;PaX: PAGEEXEC&lt;/li&gt;&lt;li&gt;PaX: EMUTRAMP&lt;/li&gt;&lt;li&gt;PaX: EMUSIGRT&lt;/li&gt;&lt;li&gt;PaX: Disallow ELF text relocations (DANGEROUS)&lt;/li&gt;&lt;li&gt;Disable privileged I/O (should not use with XFree86)&lt;/li&gt;&lt;li&gt;Hide kernel processes&lt;/li&gt;&lt;li&gt;Allow a user group access to /proc&lt;/li&gt;&lt;li&gt;Auditing options&lt;/li&gt;&lt;li&gt;Set up a single group that is the only one audited&lt;/li&gt;&lt;li&gt;Exec logging&lt;/li&gt;&lt;li&gt;Log execs within chroot&lt;/li&gt;&lt;li&gt;Chdir logging&lt;/li&gt;&lt;li&gt;IPC logging&lt;/li&gt;&lt;li&gt;Trusted path execution&lt;/li&gt;&lt;li&gt;Socket restrictions&lt;/li&gt;&lt;li&gt;Sysctl support&lt;/li&gt;&lt;li&gt;Netfilter Configuration: stealth match support(18) *1&lt;/li&gt;&lt;/ul&gt;   For personal computers, I select “Low security” and enable all of the logging and auditing features. For servers and mission critical machines, I start with “Medium security” and add additional elements based on my own discretion.&lt;br /&gt;&lt;br /&gt;  After you have selected all of the necessary options, lets compile the kernel.&lt;br /&gt;&lt;br /&gt;       &lt;blockqutoe&gt;&lt;i&gt;# make modules modules_install bzImage &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Finally, copy the new kernel into your /boot directory and adjust your bootloader to load the new kernel. Your new kernel will be located in "usr/src/linux/arch/i386/boot/." At this point, you now have a Linux kernel with copious amounts of added security and protection.&lt;br /&gt;&lt;br /&gt;Check back soon because our next article will show you how to use the role based access control system and how to compile programs to take advantage of the PaX address space modification restrictions!&lt;br /&gt;&lt;br /&gt;  &lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.sans.org/reading_room/whitepapers/linux/1294.php"&gt;*1 Merry, Taylor. Linux Kernel Hardening. 18 November 2003&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href="http://www.grsecurity.net/"&gt;GrSecurity Homepage&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href="http://pax.grsecurity.net/"&gt;PaX Homepage&lt;/a&gt;                                  &lt;/blockqutoe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1437382765045043018-2720370360245015255?l=8ciphers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://8ciphers.blogspot.com/feeds/2720370360245015255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1437382765045043018&amp;postID=2720370360245015255' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1437382765045043018/posts/default/2720370360245015255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1437382765045043018/posts/default/2720370360245015255'/><link rel='alternate' type='text/html' href='http://8ciphers.blogspot.com/2007/12/quick-and-dirty-guide-to-kernel.html' title='A Quick and Dirty Guide To Kernel Hardening with GrSecurity'/><author><name>Gian G. Spicuzza</name><uri>http://www.blogger.com/profile/07116472399242056341</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='05909173664092634319'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1437382765045043018.post-3541234492380848549</id><published>2007-11-16T19:36:00.000-05:00</published><updated>2007-11-16T19:38:03.529-05:00</updated><title type='text'>Social Engineering is not just a definition!</title><content type='html'>&lt;span style="font-family:Verdana;"&gt;   In modern day, you would assume that brute force hacking coupled with some   known software flaws would be the easiest way to circumvent a security   system. You’d be wrong. Why waste time pounding a server when you can just   pick up the phone? The oldest trick in the book still reigns supreme. Take   this conversation for an example:&lt;br /&gt;&lt;br /&gt;"Hi Linda, this is Craig with IT. We are implementing a new password system   where each password must contain 10 characters, with at least one number and   one capital letter. What would you like me to set yours as? ... What is your   old password for confirmation? ... Great, your new password should be active   later this month."&lt;br /&gt;&lt;br /&gt;Craig never worked for Linda's company, nor did he call from IT. Craig was   an unethical hacker who just gained unauthorized access to her account. &lt;b&gt;  Why? Because a phone call is simple.&lt;/b&gt; Why spend hours poking for security   holes when unsuspecting employees will just give you confidential   information? This person-to-person deception is known as social engineering,   produced through logical human flaws classified under cognitive biases.&lt;span style="font-size:78%;"&gt;1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It seems social engineering and even physical security have become &lt;u&gt;second&lt;/u&gt;   to digital security. Firewalls, encryption, and public keys have saturated   the market and our mind--making them top priority. &lt;b&gt;Without educated   employees, modern digital security is useless.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Take this actual event for example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;  About three years ago, I was hired as a security consultant for a   medium-sized company. I looked over their software, firewalls, and servers;   everything was up to date and acceptable. There were a few small problems,   but overall their physical and digital security schemes were acceptable in   my book. The next step was to test their employees--the psychological aspect   of my report.&lt;br /&gt;&lt;br /&gt;Two weeks later, I sent my colleague whom they have never met before to   their office. He walked up to the front desk, introduced himself to the   receptionist, and said he was here for a security update. He instructed the   secretary for her username, password, and a key to the server room. He was   polite, smiled, and had a crisp business card from my company. She complied   without question, and then he proceeded to enter each subsequent cubical,   retrieving the username and password for each employee who was available.&lt;br /&gt;&lt;br /&gt;My security report for them had three main sections: digital, physical, and   psychological. The latter was labeled in big red letters, "Immediate action   is required to prevent compromise!" About 12 hours later, I received a phone   call from the IT manger. With a stern attitude, he exclaimed that if their   servers were secure, there is no way they could be compromised. I responded   slowly in a calm voice, "they can, because a young man walked into your   office with nothing but a mere business card, and walked out with 55   passwords and a key to your server room."&lt;br /&gt;&lt;br /&gt; After a long conversation, it was clear that their security policy needed to   be updated, and more importantly, that their employees needed   training...desperately. It took over two weeks to talk with every employee,   numerous phony scam emails to keep each worker on their toes, and finally, I   sent my young colleague back in. This time, the receptionist called me to   confirm his identity, and photocopied his driver's license.&lt;br /&gt;&lt;br /&gt;Well done I told her, well done.&lt;/blockquote&gt;  &lt;br /&gt;&lt;u&gt;So how does all of this pertain to you and your company?&lt;/u&gt; Talk to your  employees--educate them. Offer and even &lt;b&gt;require&lt;/b&gt; training sessions. Send   emails to your employees asking for their password and/or confidential   information. If they respond, tell them that they shouldn't! Probe them and   always be testing! Make sure each and every person is aware of current and   past scams, social engineering tricks, and safe practices.&lt;br /&gt;&lt;br /&gt;&lt;div style="border-style: solid; border-width: 1px; padding: 1px 4px;"&gt;    &lt;b&gt;You can have the most secure servers and firewalls, but if your employees   just hand over confidential information, you are doomed from the start.&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;References&lt;br /&gt;&lt;span style="font-size:78%;"&gt;1&lt;/span&gt; CSEPS Course Workbook, unit 3&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1437382765045043018-3541234492380848549?l=8ciphers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://8ciphers.blogspot.com/feeds/3541234492380848549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1437382765045043018&amp;postID=3541234492380848549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1437382765045043018/posts/default/3541234492380848549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1437382765045043018/posts/default/3541234492380848549'/><link rel='alternate' type='text/html' href='http://8ciphers.blogspot.com/2007/11/social-engineering-is-not-just.html' title='Social Engineering is not just a definition!'/><author><name>Gian G. Spicuzza</name><uri>http://www.blogger.com/profile/07116472399242056341</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='05909173664092634319'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>