LFCA: How to Improve Network Security

  • Thread Author
Network security is increasingly becoming one of the areas in which organizations invest a lot of time and resources.
This is because the company's network is the backbone of any IT infrastructure and connects all servers and network devices.

If the network is compromised, the organization will be largely at the mercy of hackers.
Critical data can be stolen, and business-oriented services and applications can be disabled.

Network security is a fairly broad topic and usually requires a two-pronged approach.
Network administrators usually set up network security devices such as firewalls, IDS (Intrusion Detection Systems) and IPS (Intrusion Prevention Systems) as the first line of defense. While this can provide a decent level of security, there are some additional steps that need to be taken at the OS level to prevent any breaches.

At this point, you should already be familiar with networking concepts such as IP addressing and TCP / IP services and protocols.
You should also be aware of basic security concepts such as setting strong passwords and configuring a firewall.
Before we go over the various steps to keep your system secure, let's first take a look at some of the common network threats.

What is Network Attack?
A large and rather complex corporate network can rely on multiple connected endpoints to support business operations
While this can provide the necessary connectivity to streamline workflows, it poses a security risk.
Greater flexibility means a broader threat landscape that an attacker can use to launch a network attack.

So what is a network attack?
A network attack is unauthorized access to an organization's network for the sole purpose of gaining access and stealing data, as well as performing other nefarious activities such as damaging websites and damaging applications.

There are two broad categories of network attacks.
  • Passive attack: In a passive attack, a hacker gains unauthorized access solely to spy on and steal data without altering or damaging it.
  • Active attack: Here, an attacker not only penetrates the network to steal data, but also modifies, deletes, corrupts or encrypts data, destroys applications, and stops running services.
Types of network attacks
Let's take a look at some of the common network attacks that can compromise your Linux system:

1. Software vulnerabilities
Running old and outdated versions of software can easily put your system at risk, and this has a lot to do with internal vulnerabilities and hidden backdoors.
For this reason, it is always recommended to apply software patches continuously by updating your software applications to the latest versions.

2. MITM
A man-in-the-middle attack, usually abbreviated as MITM, is an attack in which an attacker intercepts communication between a user and an application or endpoint.
By positioning himself between a legitimate user and an application, an attacker can turn off encryption and eavesdrop on messages sent to and from there.
This allows him to receive sensitive information such as login credentials and other personal information.
The likely targets for such an attack are usually e-commerce sites, SaaS businesses, and financial applications.
To launch these attacks, hackers use packet capture tools that capture packets from wireless devices.
The hacker then injects malicious code into the exchanged packets.

3. Malicious software
Malware is a collection of malware and includes a wide range of malicious applications such as viruses, Trojans, spyware, and ransomware, to name just a few.
Once inside the network, malware spreads to various devices and servers.
Depending on the type of malware, the consequences can be devastating. Viruses and spyware can spy on, steal and intercept highly sensitive data, damage or delete files, slow down the network, and even hijack applications. The ransomware encrypts files, which then become inaccessible unless the victim provides a significant amount of ransom.

4. Distributed Denial of Service (DDoS) attacks.
A DDoS attack is an attack in which an attacker makes a target system unavailable and thereby prevents users from accessing critical services and applications.
An attacker achieves this by using botnets that flood the target system with huge volumes of SYN packets, ultimately making it unavailable for a period of time.
DDoS attacks can crash databases as well as websites.

5. Internal threats / unauthorized employee access
Disgruntled PA employees can easily break the system.
Such attacks are usually difficult to detect and defend because employees do not need to penetrate the network.
In addition, some employees may inadvertently infect the network with malware by connecting USB devices with malware.

Mitigating network attacks
Let's take a look at a few steps you can take to create a barrier that will provide a significant level of security to prevent potential network attacks.

1. Keep your software applications up to date
Updating your software packages will fix any existing vulnerabilities that could put your system at risk of being compromised by hackers.

2. Implement a host based firewall
Besides network firewalls, which usually provide the first line of defense against intrusions, you can also implement a host based firewall like firewalld and UFW firewall.
These are simple yet effective firewalls that provide an extra layer of security by filtering network traffic based on a set of rules.

3. Disable services that you do not need.
If you have running services that are not actively used, disable them.
This helps to minimize the attack surface and leaves the attacker with minimal opportunities to exploit and find loopholes.
You can use a network scanning tool like Nmap to scan and check any open ports.
If unnecessary ports are open, consider blocking them on your firewall.

4. Configure TCP wrappers
TCP wrappers are host-based ACLs (Access Control Lists) that restrict access to network services based on a set of rules such as IP addresses.

The wrappers refer to the following host files to determine where the client will be granted or denied access to the network service.
  • /etc/hosts.allow
  • /etc/hosts.deny
A few notes:
  • The rules are read from top to bottom. The first matching rule for a given service is applied first. Please note that order is extremely important.
  • The rules in the /etc/hosts.allow file are applied first and take precedence over the rules defined in the /etc/hosts.deny file. This means that if access to a network service is allowed in the /etc/hosts.allow file, denying access to the same service in the /etc/hosts.deny file will be ignored or ignored.
  • If the service rules do not exist in any of the host files, access to the service is granted by default.
  • Changes made to both host files take effect immediately without restarting the services.
5. Secure remote protocols and VPN usage
In our previous sections, we looked at how you can secure the SSH protocol to prevent malicious users from accessing your system.
Equally important is the use of a VPN to initiate remote access to a Linux server, especially over a public network.
VPN encrypts all data exchanged between the server and remote hosts, eliminating the possibility of intercepting packets.

6. Round-the-clock network monitoring.
Monitoring your infrastructure with tools like WireShark will help you monitor and inspect traffic for malicious data packets.
You can also implement fail2ban or crowdsec to protect your server from brute force attacks.

7. Install anti-malware software.
Linux is increasingly becoming a target for hackers due to its growing popularity and use.
Therefore, it is wise to install security tools to scan the system for rootkits, viruses, Trojans and any malware.
There are popular open source solutions like ClamAV that effectively detect malware.

You might also consider installing chkrootkit to check for any signs of rootkits on your system.
  • Three tools to scan a Linux server for viruses, malware and rootkits
  • 5 tools to scan Linux server for malware and rootkits
8. Segmentation of the network.
Consider segmenting your network into VLANs (virtual local area networks).
This is done by creating subnets on the same network that act as stand-alone networks.
Segmenting your network goes a long way in limiting the impact of a breach to one area and makes it harder for hackers to access across other subnets.

9. Encryption of wireless devices.
If you have wireless routers or access points on your network, make sure they use the latest encryption technologies to minimize the risks of MITM attacks.
 
Top