{"id":97,"date":"2006-04-15T09:09:42","date_gmt":"2006-04-15T09:09:42","guid":{"rendered":"https:\/\/www.darknet.org.uk\/2006\/04\/some-good-tips-to-secure-linux\/"},"modified":"2010-06-21T17:42:48","modified_gmt":"2010-06-21T16:42:48","slug":"some-good-tips-to-secure-linux","status":"publish","type":"post","link":"https:\/\/www.darknet.org.uk\/2006\/04\/some-good-tips-to-secure-linux\/","title":{"rendered":"Some Good Tips to Secure Linux"},"content":{"rendered":"

<\/p>\n

I came across this while browsing, has some pretty solid stuff, goes deeper than most basic Linux security guides.<\/p>\n

It has some good sections like this on protection against fork bombs:<\/p>\n

Fork bombs are programs that keep creating child processes until system resources are all used, they actually aren’t remote exploits because they require a local user to execute the bomb, however, users may be tricked into running a fork bomb, for example the following example may look innocent, but running it on an unprotected system may take the whole system down:<\/p>\n

:( ){ : |:& }; :<\/code><\/p>\n

WARNING: do NOT run the above code on an unprotected system!<\/em><\/p>\n

The above shell script will actually keep forking at an exponential rate until system resources are exhausted.<\/p>\n

To protect a system against such attacks, there is a file for limiting the number of processes for each user, it is \/etc\/security\/limits.conf, add the following two lines to it:
\n@users soft nproc 100
\n@users hard nproc 150<\/p>\n

The lines prevent anyone in the users group from having more than 150 processes, and issue a warning at 100 processes.<\/p>\n

Your system may not have a users group, so you may need to edit the lines to suit your needs.<\/p><\/blockquote>\n

There are some other things you can do like using a file integrity checker, installing a log checker or centralising logs with something like syslog-ng, scanning for SU files on a regular basis, setup alerts if a new user is added and so on, but this gives you a start.<\/p>\n

It has some security tips for OpenSSH, Samba and MySQL too.<\/p>\n

I recommend taking a look anyway!<\/p>\n

<\/p>\n

Tips to Secure Linux Workstation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

I came across this while browsing, has some pretty solid stuff, goes deeper than most basic Linux security guides. It has some good sections like this on protection against fork bombs: Fork bombs are programs that keep creating child processes until system resources are all used, they actually aren’t remote exploits because they require a […]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[6],"tags":[37,451,44,450],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Darknet","author_link":"https:\/\/www.darknet.org.uk\/author\/darknet\/"},"_links":{"self":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/posts\/97"}],"collection":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":0,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}