<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Security Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/linux-security/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 29 Oct 2018 12:35:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>The Meltdown Defense – Linux Tool by SentinelOne</title>
		<link>https://www.osradar.com/meltdown-defense-linux-tool-sentinelone/</link>
					<comments>https://www.osradar.com/meltdown-defense-linux-tool-sentinelone/#respond</comments>
		
		<dc:creator><![CDATA[Mel K]]></dc:creator>
		<pubDate>Mon, 29 Jan 2018 07:07:23 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Meltdown]]></category>
		<category><![CDATA[meltdown and spectre]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=1630</guid>

					<description><![CDATA[<p>The Meltdown and Spectre have been the topic of security for a while. The reason is the category of these vulnerabilities – hardware issues. Can you imagine that almost all the processors since 1995 are affected? For getting rid of all them, the best solution is to change hardware – a very costly solution that [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/meltdown-defense-linux-tool-sentinelone/">The Meltdown Defense – Linux Tool by SentinelOne</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The Meltdown and Spectre have been the topic of security for a while. The reason is the category of these vulnerabilities – hardware issues. Can you imagine that almost all the processors since 1995 are affected? For getting rid of all them, the best solution is to change hardware – a very costly solution that a lot can’t afford. We’re having software patches to mitigate the damage possibility. Fortunately, SentinelOne has released a free tool for Linux that allows system admins to prevent Meltdown attacks before they take root.</p>
<p>The new tool developed by SentinelOne is named Blacksmith. It’s a free tool for everyone. <a href="https://www.sentinelone.com/blog/sentinelone-releases-free-linux-tool-detect-meltdown-vulnerability-exploitations/">Get Blacksmith from SentinelOne</a>. However, Blacksmith tool isn’t open-source. SentinelOne decided to save time by expediting its development in-house, according to Raj Rajamani, vice president of project management at SentinelOne. He also informed that the tool is free for everyone in hope of securing Linux systems while devs create reliable system patches.</p>
<h3>Why use Blacksmith</h3>
<p>At the end of 2017, security researchers identified the horrible &amp; terrible bug in most of the modern processors. All these processors used a method called “speculative execution” that allowed these 2 heinous bugs to be possible. Intel, AMD, and ARM – all are affected by them, mostly Intel. The Meltdown flaw is a design flaw of all the Intel chips. The flaw was in the kernel that controlled the chip performance. It’s possible to defend using software patches. However, the Spectre is a lot more difficult to defend against. Learn more about <a href="https://www.osradar.com/meltdown-spectre-computers-stake/">the Meltdown and Spectre</a>.</p>
<p>With the help of SentinelOne’s Blacksmith, Linux users now will be defending Meltdown attacks successfully. The company is working on a similar tool for defense against Spectre as well.</p>
<p>The tool works beyond all the other tools offer today. Some tools only tell you whether you’re exposed or not. Security researcher Dor Danker at SentinelOne used behavioral detection methods to develop Blacksmith that’s capable of catching any Meltdown exploit &amp; attempts. Danker and his fellow researchers took several weeks to prepare the tool. The process required gathering data from industry partners, chip makers, and Microsoft.</p>
<h3>Why on Linux</h3>
<p>The reason this tool is made for Linux is pretty obvious. First of all, Linux is more susceptible to Meltdown attacks with no extensive available solution. An important note, the top computers – servers, supercomputers etc. all use Linux as their OS. These 2 reasons are very lucrative for hackers to target Linux as an easy, valuable hunt.</p>
<p>According to Migo Kedem, SentinelOne’s director of product management said that the reasons make it clear why Linux needs effective protection as quickly as possible.</p>
<p>The currently available patches slow down the system. It’s not so much visible for home users. However, the influence is huge when we talk about enterprises. It’s the main reason why IT organizations may decide to resist the patches or wait for further patches. That’s where this tool will be really handy without any performance changes.</p>
<h3>How Blacksmith works</h3>
<p>The tool influences the feature of performance counting on modern chipsets. Using this method, Blacksmith can monitor malicious caching behavior. According to Danker, the Meltdown creates different patterns during exploitation.</p>
<p>Here&#8217;s the official demonstration of Blacksmith.</p>
<div style="width: 696px;" class="wp-video"><!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->
<video class="wp-video-shortcode" id="video-1630-1" width="696" height="392" preload="metadata" controls="controls"><source type="video/mp4" src="https://www.osradar.com/wp-content/uploads/2018/01/SentinelOne-Releases-Free-Linux-Tool-to-Detect-Meltdown-Vulnerability-Exploitations.mp4?_=1" /><a href="https://www.osradar.com/wp-content/uploads/2018/01/SentinelOne-Releases-Free-Linux-Tool-to-Detect-Meltdown-Vulnerability-Exploitations.mp4">https://www.osradar.com/wp-content/uploads/2018/01/SentinelOne-Releases-Free-Linux-Tool-to-Detect-Meltdown-Vulnerability-Exploitations.mp4</a></video></div>
<p>On modern chipsets, Blacksmith uses the built-in Linux mechanism “perf evennts”. It collects info about running processes. Kedem said that in case of virtual environments and older processors, Blacksmith looks for a specific type of page fault, indicating Meltdown exploitation attempts.</p>
<p>When the tool identifies any attempt, Blacksmith reports to “Syslog” locally. If the “Syslog” is on a remote server, Blacksmith sends the report via email. Checking on that, system admins can take necessary measures to clean up the exploitation.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/meltdown-defense-linux-tool-sentinelone/">The Meltdown Defense – Linux Tool by SentinelOne</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/meltdown-defense-linux-tool-sentinelone/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://www.osradar.com/wp-content/uploads/2018/01/SentinelOne-Releases-Free-Linux-Tool-to-Detect-Meltdown-Vulnerability-Exploitations.mp4" length="20533554" type="video/mp4" />

			</item>
		<item>
		<title>How To Secure Your Linux Server</title>
		<link>https://www.osradar.com/how-to-secure-your-linux-server/</link>
					<comments>https://www.osradar.com/how-to-secure-your-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[Mel K]]></dc:creator>
		<pubDate>Wed, 27 Dec 2017 13:52:59 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Linux Security]]></category>
		<guid isPermaLink="false">http://osradar.com/?p=529</guid>

					<description><![CDATA[<p>At the annual LinuxCon conference in 2015, Linux kernel creator Linus Torvalds shared his opinion on the security of the system. He stressed the need to mitigate the effect of the presence of certain bugs with competent protection, so that if one component is broken, the next layer would cover the problem. In this article we [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-secure-your-linux-server/">How To Secure Your Linux Server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>At the annual LinuxCon conference in 2015, Linux kernel creator Linus Torvalds shared his opinion on the security of the system. He stressed the need to mitigate the effect of the presence of certain bugs with competent protection, so that if one component is broken, the next layer would cover the problem.</p>
<p>In this article we will try to open this topic from a practical point of view:</p>
<ul>
<li>start with the preliminary configuration and recommendations for the selection and installation of Linux distributions;</li>
<li>then tell you about a simple and effective point of protection &#8211; security update;</li>
<li>Next, we&#8217;ll look at how to set limits for programs and users;</li>
<li>How to secure a connection to the server via SSH;</li>
<li>Here are examples of configuring a firewall and limiting unwanted traffic;</li>
<li>In the final part, we&#8217;ll explain how to disable unnecessary programs and services, how to further protect servers from intruders.</li>
</ul>
<p>&nbsp;</p>
<h3>1. Configure the preload environment before installing Linux</h3>
<p>You need to take care of the security of the system before installing Linux. Here is a set of recommendations for setting up a computer that you should consider and perform before installing the operating system:</p>
<ul>
<li>Loading in UEFI mode (not legacy BIOS)</li>
<li>Set the password for setting UEFI</li>
<li>Enable SecureBoot mode</li>
<li>Set a password at the UEFI level to boot the system</li>
</ul>
<p>&nbsp;</p>
<h3>2. Select the appropriate Linux distribution</h3>
<p>Most likely, you will choose popular distributions &#8211; Fedora, Ubuntu, Arch, Debian, or other close forks. In any case, you need to consider the mandatory presence of these functions:</p>
<ul>
<li>Support for forced (MAC) and role-based access control (RBAC): SELinux / AppArmor / GrSecurity</li>
<li>Publication of security bulletins</li>
<li>Regular release of security updates</li>
<li>Cryptographic verification of packages</li>
<li>Support for UEFI and SecureBoot</li>
<li>Support for full native disk encryption</li>
</ul>
<p><b>Recommendations for installing distributions</b></p>
<p>All distributions are different, but there are some points that you should pay attention to and do:</p>
<ul>
<li>Use the full disk encryption (LUKS) with a reliable passphrase</li>
<li>The paging process should be encrypted</li>
<li>Set the password for editing the boot loader</li>
<li>A strong password for root access</li>
<li>Use an account without privileges that belongs to the Administrators group</li>
<li>Set a strong password for the user, different from the root password</li>
</ul>
<p>&nbsp;</p>
<h3>3. Configure automatic security updates</h3>
<p>One of the main ways to ensure the security of the operating system is to update the software. Updates often fix found bugs and critical vulnerabilities.</p>
<p>In the case of server systems, there is a risk of failures during the update, but in our opinion, problems can be minimized by automatically installing only the security update .</p>
<p>Auto-update works only for those installed from the repositories, rather than compiled packages themselves:</p>
<ul>
<li>Debian / Ubuntu uses the unattended upgrades package for updates</li>
<li>CentOS uses auto-update for auto-update</li>
<li>In Fedora for these purposes there is dnf-automatic</li>
</ul>
<p>To update, use any of the available package managers with the commands:</p>
<pre class="">#yum update
#apt-get update
#apt-get upgrade</pre>
<p>Linux can be configured to send notifications of new updates by email.</p>
<p>Also, to maintain security in the Linux kernel, there are security extensions , such as SELinux. Such an extension will help to save the system from misconfigured or dangerous programs.</p>
<p>SELinux is a flexible system of compulsory access control, which can work simultaneously with the selective access control system. Running programs get access to files, sockets and other processes, and SELinux sets limits so that harmful applications can not break the system.</p>
<h3>4. Restrict access to external systems</h3>
<p>The next protection method after the upgrade is to restrict access to external services. To do this, you need to edit the files /etc/hosts.allow and /etc/hosts.deny.</p>
<p>Here is an example of how to restrict access to telnet and ftp:<br />
In the /etc/hosts.allow file:</p>
<pre class="">
hosts.allow 
in.telnetd: 123.12.41., 126.27.18., .mydomain.name, .another.name 
in.ftpd: 123.12.41., 126.27.18., .mydomain.name, .another.name</pre>
<p>The example above will allow telnet and ftp connections to any host in IP classes 123.12.41. * And 126.27.18. *, As well as to the host with the domains mydomain.name and another.name.</p>
<p>Further in the file /etc/hosts.deny &#8216;:</p>
<pre class="">hosts.deny
in.telnetd: ALL
in.ftpd: ALL</pre>
<p><b>Adding a user with limited rights</b></p>
<p>We do not recommend connecting to the server as root, it has the rights to execute any commands, even critical for the system. Therefore, it is better to create a user with limited rights and work through it. Administration can be performed through sudo (substitute user and do) &#8211; this is a temporary elevation of privileges to the administrator level.</p>
<p>How to create a new user:</p>
<p><i>In Debian and Ubuntu:</i></p>
<p>Create a user by replacing the administrator with the desired name and specify the password in response to the request. The entered password symbols are not displayed on the command line:</p>
<pre class="">adduser administrator</pre>
<p>Add a user to the sudo group:</p>
<pre class="">adduser administrator sudo</pre>
<p>Now you can use the sudo prefix when executing commands that require administrator rights, for example:</p>
<pre class="">sudo apt-get install htop </pre>
<p><i>In CentOS and Fedora:</i></p>
<p>Create a user by replacing the administrator with the desired name, and create a password for his account:</p>
<preclass="">useradd adminstrator ; passwd administrator</pre>
<p>Add a user to the wheel group to pass sudo rights to it:</p>
<pre class="">usermod –aG wheel administrator</pre>
<p>Use only strong passwords &#8211; at least 8 letters of a different register, numbers and other special characters. To search for weak passwords among users of your server, use utilities like &#8220;John the ripper&#8221;, change the settings in the pam_cracklib.so file to force passwords.</p>
<p>Use the chage command to set the password expiration period:</p>
<pre class="">chage -M 60 -m 7 -W 7 UserName</pre>
<p>You can disable password obsolescence with the command:</p>
<pre class="">chage -M 99999 UserName</pre>
<p>Find out when a user&#8217;s password is out of date:</p>
<pre> chage -l UserName</pre>
<p>Also, you can edit the fields in the / etc / shadow file:</p>
<pre> {UserName}:{password}:{lastpasswdchanged}:{Minimum_days}:{Maximum_days}:{Warn}:{Inactive}:{Expire}:</pre>
<p>Where,</p>
<ul>
<li>Minimum_days: The minimum number of days before the password expires.</li>
<li>Maximum_days: The maximum number of days before the password expires.</li>
<li>Warn: The number of days before the expiration, when the user is warned about the approaching shift day.</li>
<li>Expire: The exact expiration date of the login.</li>
</ul>
<p>Also, you should limit the reuse of old passwords in the pam_unix.so module and set the maximum number of unsuccessful user login attempts.</p>
<p>To see the number of failed login attempts:</p>
<pre>faillog</pre>
<p>Unblock account after unsuccessful login:</p>
<pre> faillog -r -u UserName</pre>
<p>To lock and unlock accounts, you can use the passwd command:</p>
<pre> lock account
passwd -l UserName</pre>
<p>&nbsp;</p>
<pre>unlocak account
passwd -u UserName</pre>
<p>Make sure that all users have passwords, you can use the command:</p>
<pre>awk -F:'($2 == "") {print}' /etc/shadow</pre>
<p>Block users without passwords:</p>
<pre>passwd -l  ИмяПользователя</pre>
<p>Make sure that the UID parameter is set to 0 only for the root account. Enter this command to view all users with an equal 0 UID.</p>
<pre>>awk -F: '($3 == "0") {print}' /etc/passwd</pre>
<p>You should see only:</p>
<pre>root:x:0:0:root:/root:/bin/bash</pre>
<p>If there are other lines, check if you set the UID for them to 0, delete the unnecessary rows.</p>
<h3>5. Configure access rights for users</h3>
<p>After setting the passwords, it&#8217;s worth making sure that all users have access that matches their rank and responsibility. In Linux, you can set permissions on files and directories. This makes it possible to create and control different levels of access for different users.</p>
<p><b>The</b></p>
<p>Linux <b>access category is</b> based on working with multiple users, so each file belongs to one particular user. Even if the server is administered by one person, several accounts are created for different programs.</p>
<p>To view users in the system, you can use the command:</p>
<pre> cat /etc/passwd</pre>
<p>The / etc / passwd file contains a string for each user of the operating system. For services and applications, individual users can be created, which will also be present in this file.</p>
<p>In addition to individual accounts, there is an access category for groups. Each file belongs to the same group. One user can belong to several groups.</p>
<p>To view the groups to which your account belongs, you can use the command:</p>
<pre>groups</pre>
<p>Display a list of all groups in the system, where the first field indicates the name of the group:</p>
<pre>cat /etc/group</pre>
<p>There is a &#8220;other&#8221; access category if the user does not have access to the file and does not belong to the group.</p>
<p><b>Access types</b></p>
<p>For user categories, it is possible to set access types. Usually this is the right to start, read, and modify the file. In Linux, access types are marked with two types of notation: alphabetic and octal.</p>
<p>In alphabetical notation, the permissions are marked with the letters:</p>
<blockquote><p>r = read<br />
w = change<br />
x = start</p></blockquote>
<p>In octal notation, the level of access to files is determined by numbers from 0 to 7, where 0 means no access, and 7 means full access to change, read and execute:</p>
<blockquote><p>4 = read<br />
2 = change<br />
1 = start</p></blockquote>
<p>&nbsp;</p>
<h3>6. Use keys for SSH connection</h3>
<p>Usually password authentication is used to connect to the host via SSH. We recommend a more secure way, an input on a pair of cryptographic keys. In this case, the private key is used instead of the password, which seriously complicates the brute force selection.</p>
<p>For example, create a pair of keys. Actions must be performed on the local computer, not on the remote server. During the creation of keys, you can specify a password for accessing them. If you leave this field blank, you will not be able to use the generated keys before saving them to the keychain manager of the computer.</p>
<p>If you have already created RSA keys earlier, skip the generation command. To test existing keys, run:</p>
<pre>ls ~/.ssh/id_rsa*</pre>
<p>To generate new keys:</p>
<pre>ssh-keygen –b 4096</pre>
<p><b>Downloading the public key to the server</b></p>
<p>Replace the administrator with the name of the key owner, and 1.1.1.1 with the ip address of your server. From the local computer, type:</p>
<pre>ssh-copy-id administrator@1.1.1.1</pre>
<p>To check the connection, disconnect and reconnect to the server &#8211; the input must occur on the generated keys.</p>
<p><b>Configuring SSH</b></p>
<p>You can prevent SSH from connecting as root, and to get administrator rights, use sudo at the beginning of the command. On the server in the file / etc / ssh / sshd_config you need to find the PermitRootLogin parameter and set its value to no.</p>
<p>You can also disable the SSH connection by entering a password so that all users use the keys. In the / etc / ssh / sshd_config file, set the PasswordAuthentification parameter to no. If this line is missing or commented out, then add or uncomment it accordingly.</p>
<p>In Debian or Ubuntu, you can enter:</p>
<pre> class="">nano /etc/ssh/sshd_config

...
PasswordAuthentication no</pre>
<p>Connection can also be further secured with two-factor authentication.</p>
<h3>7. Install firewalls</h3>
<p>A new vulnerability has recently been discovered that allows you to conduct DDoS attacks on servers running Linux. The bug in the kernel of the system appeared from version 3.6 at the end of 2012. Vulnerability allows hackers to inject viruses into download files, web pages and open Tor-connections, and for hacking it does not need to exert much effort &#8211; the IP-spoofing method will work.</p>
<p>Maximum harm for encrypted HTTPS or SSH connections is interruption of connection, but in unprotected traffic an attacker can place new content, including malicious programs. To protect against such attacks, firewall is suitable.</p>
<p><b>Blocking access using the Firewall</b></p>
<p>Firewall is one of the most important tools for blocking unwanted incoming traffic. We recommend to skip only the really necessary traffic and completely prohibit the rest.</p>
<p>To filter packets, most Linux distributions have an iptables controller. Usually it is used by experienced users, and for simplified configuration, you can use UFW utilities in Debian / Ubuntu or FirewallD in Fedora.</p>
<h3>8. Disable unnecessary services</h3>
<p>Specialists from the University of Virginia recommend that you disable all services that you do not use. Some background processes are set to autoload and work until the system is shut down. To configure these programs, you need to test the initialization scripts. The services can be started through inetd or xinetd.</p>
<p>If your system is configured via inetd, then in /etc/inetd.conf you can edit the list of background programs of &#8220;daemons&#8221;, to disable the loading of the service it is enough to put the &#8220;#&#8221; sign at the beginning of the line, turning it from an executable into a comment.</p>
<p>If the system uses xinetd, its configuration will be in the /etc/xinetd.d directory. Each directory file defines a service that can be disabled by specifying the item disable = yes, as in this example:</p>
<pre> class="">service finger
{
 type           = stream
  wait            = no
  user            = nobody
  server          = /usr/sbin/in.fingerd
  disable         = yes
}
</pre>
<p>It is also worth checking the persistent processes that are not controlled by inetd or xinetd. You can configure startup scripts in the directories /etc/init.d or / etc / inittab. After the changes made, run the command under the root account.</p>
<pre> class="">/etc/rc.d/init.d/inet restart</pre>
<p>&nbsp;</p>
<h3>9. Protect the server physically</h3>
<p>It is impossible to completely defend yourself from attacks by an attacker with physical access to the server. Therefore, you need to secure the room where your system is located. Data centers seriously monitor security, restrict access to servers, install security cameras and assign permanent security.</p>
<p>To enter the data center, all visitors must undergo certain stages of authentication. It is also highly recommended to use motion sensors in all rooms of the center.</p>
<h3>10. Protect the server from unauthorized access</h3>
<p>An unauthorized access system collects system configuration data and files and then compares these data with new changes to determine if they are harmful to the system.</p>
<p>For example, the Tripwire and Aide tools collect a database of system files and protect them with a set of keys. Psad is used to track suspicious activity using firewall reports.</p>
<p>Bro is designed to monitor the network, monitor suspicious activity schemes, collect statistics, execute system commands, and generate alerts. RKHunter can be used to protect against viruses, most often rootkits. This utility checks your system based on known vulnerabilities and can detect unsafe settings in applications.</p>
<h3>Conclusion</h3>
<p>The tools and settings listed above will help you partially protect the system, but security depends on your behavior and understanding of the situation. Without care, caution and constant self-study, all protective measures may not work.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-secure-your-linux-server/">How To Secure Your Linux Server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-secure-your-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
