Skip to the content.

đź”— Link to the Room

🏷️Table of Contents

  1. Common Threat and Attack Vectors
    1.1 Difference between Network Devices and Endpoint Devices
    1.2 Common Threats and Attack Vectors of Network Devices
  2. Common Hardening Techniques
    2.1 General Techniques
    2.2 Importance of Secure Protocols
    2.3 Removal/Blocking of Insecure Protocols
    2.4 Implementation of Monitoring and Logging Controls
  3. Hardening Virtual Private Networks
    3.1 Connecting to the Machine
    3.2 Standard Hardening Practices
  4. Hardening Routers, Switches and Firewalls
    4.1 Recommended Hardening Techniques
  5. Hardening Routers, Switches and Firewalls - More Techniques
    5.1 Recommended Hardening Techniques
    5.2 Additional Techniques in an Enterprise Environment
  6. Important Tools for Network Monitoring

📚 Study Notes

Network devices are the basic parts that make modern networks work. They help send, receive, control, and protect data as it moves between computers and networks.

There are different types of network devices. Some are very simple, like hubs and repeaters, which just pass data along. Others are more advanced, like switches and routers, which direct traffic. There are also devices that balance traffic, create secure connections (VPNs), and protect networks from attacks (intrusion prevention systems).

 

Common Threat and Attack Vectors

 

Difference between Network Devices and Endpoint Devices

Before learning more, it’s important to understand the difference:

 

[!NOTE] Endpoints use the network.
Network devices run and manage the network.

 

image

Common Threats and Attack Vectors of Network Devices

Modern ICT networks have grown rapidly and connected the world, however, this growth has also increased cyber attacks.

Network devices are the backbone of these systems, so they must be secured.

To protect Confidentiality, Integrity, and Availability (CIA), we need to apply security hardening to network devices.

Goals of security hardening:

Threat Description Attack Vector
Unauthorised access Gain unauthorised control of a network device, and then the complete network. Password attacks (brute force, dictionary & hybrid), Exploit known vulnerabilities, e.g. RCE, Social Engineering/Phishing attack to trick network administrators into disclosing sensitive information such as usernames and passwords of devices
Denial of Service (DoS) Disruption of critical devices and services to make them unavailable to genuine users. Flooding devices with fake requests, exploiting vulnerabilities in logical or resource handling, manipulating network packets
Man-in-the-Middle Attacks Intercept the network requests between two parties by masquerading as each other to steal sensitive information or alter/manipulate the requests. ARP spoofing, DNS spoofing, Rogue access points
Privilege escalation Gaining higher-level privileges or rights to perform restricted actions, e.g. accessing sensitive information or executing malicious code. Weak passwords or use of the same passwords for user and admin accounts, exploiting vulnerabilities, misconfigurations
Bandwidth theft/ hotlinking Linking a bandwidth-intensive resource (image or video) from an external website to its original website, without permission. This can cause increased traffic to the original website. Scraping large volumes of data, DoS attacks, malware attacks

 


❓The device that is used to control and manage network resource is called?Network device

❓A threat vector that includes disruption of critical devices and services to make them unavailable to genuine users is called?Denial of Service

 

Common Hardening Techniques

 

General Techniques

Hardening techniques are meant to reduce the attack surface of a system or network by removing unnecessary functionality, limiting access, and implementing various security controls.
Some standard methods are mentioned below:

Importance of Secure Protocols

Secure protocols are important for network device hardening. They protect against unauthorized access and data breaches.

They encrypt data sent between devices, so attackers cannot read or intercept it. They also help prevent man-in-the-middle attacks and other network attacks.

By using secure protocols, only authorized users can access sensitive data and manage systems.

Common secure protocols: HTTPS, SSH, SSL/TLS, IPsec

Removal/Blocking of Insecure Protocols

Besides using secure protocols, it is also important to remove or block insecure protocols. This reduces the attack surface and makes attacks harder.

Some protocols send data in plain text (not encrypted), which attackers can easily read. E.g., FTP, HTTP, Telnet, and SMTP.

Some protocols are secure by design (such as LDAP, RDP, and SIPS), but if they are configured incorrectly, attackers may still exploit them.

Implementation of Monitoring and Logging Controls

Logging on network devices is important to detect attacks, troubleshoot problems, and meet regulations.
It keeps a record of what happens on the device, which helps with forensics, auditing, and troubleshooting.

Common logging techniques:

 


❓Suppose you are configuring a router; which of the following could be considered an insecure protocol: A: HTTPS, B: FTP, C: SSH, D: IPsecB

❓The protocol for sending log messages to a centralised server for storage and analyse is called?Syslog

 

Hardening Virtual Private Networks

 

Virtual Private Networks (VPNs) are important for protecting data and privacy, especially with remote work and online communication.

Hardening VPNs means adding extra security to make them safer from cyberattacks. This includes multi-factor authentication (MFA) and strong encryption.

These steps make it harder for hackers to access the network and help keep data safe, improving overall security and peace of mind.

Connecting to the Machine

In this room we are using an Ubuntu machine with OpenVPN installed roughout the room. You can start the virtual machine by clicking Start Machine. The machine will start in a split-screen view. In case the VM is not visible, use the blue Show Split View button at the top-right of the page. Please wait 3-5 minutes to make sure the VM is fully booted.

Standard Hardening Practices

VPN servers have server-side and client-side settings in a config file. Admins should understand and edit this file following best security practices.

Open the server config file: sudo nano /etc/openvpn/server/server.conf

Save changes: Ctrl+O → Enter, then Ctrl+X to exit

Restart OpenVPN service: sudo systemctl restart openvpn-server@server.service

Key Hardening Practices:

image

image

image

 

 


❓Update the config file to use cipher AES-128-CBC. What is the flag value linked with the cipher directive?THM{C*****_U******_***1}

❓Update the config file to use auth SHA512. What is the flag value linked with the auth directive?THM{A***_U******_**3}

❓As per the config file, what is the port number for the OpenVPN server?1194

 

Hardening Routers, Switches and Firewalls

 

 

 

image

 

 

image

 

 

image

 

 

image

 

 


❓Update the password of the router to TryHackMe123No answer needed

❓WHat is the default SSH port configured for OpenWrt in the attached VM?22

❓Go thourhg the General Settings option Under the System tab in the attached VM. The administrator has left a special message in the Notes section. What is the flag value?THM{S*******1}

❓What is the default system log buffer size value for the OpenWrt router in the attached VM?64

❓What is the start priority for the script uhttpd?50

 

Hardening Routers, Switches and Firewalls - More Techniques

 

 

image

 

 

image

Note: Since no client is connected with the network device, you won’t see any traffic in the real-time traffic statistics on the target machine.

 

 

image

 

 

image

 

 

image

 

Additional Techniques in an Enterprise Environment

Enterprise networks have many devices, which increases the attack surface for attackers.

While there’s no one-size-fits-all method to harden devices, some key security practices can help protect them.

 


❓What is the name of the rule that accepts ICMP traffic from source zone WAN and destination zone as this device?Allow-Ping

❓What is the name of the rule that forwards data coming from WAN port 9001 to LAN port 9002?THM_PORT

❓What is the version number for the available apk package?2.12.2-1

 

Important Tools for Network Monitoring

 

Network monitoring tools help maintain network security and performance by capturing and analyzing real-time traffic.
They allow administrators to identify and resolve issues such as bandwidth bottlenecks, outages, and security threats.

Some commonly used tools and their usage:

Tool Usage Description
Nagios A popular open-source software for monitoring systems, networks, and infrastructure. It provides real-time monitoring and alerting for various services and applications.
SolarWinds Network Performance Monitor A comprehensive network monitoring tool that provides real-time visibility into network performance and availability. It includes network mapping, automated network discovery, and customisable dashboards.
PRTG An all-in-one network monitoring tool that provides comprehensive performance and availability monitoring. It includes real-time traffic analysis, custom dashboards, and customisable alerts.
Zabbix A powerful open-source network monitoring tool that provides real-time network performance and availability monitoring. It includes features such as customisable dashboards, network mapping, and alerting.

 


❓Are network monitoring tools capable of detecting bandwidth bottlenecks? (yea/nay)yea

Â