Server security Flashcards
Router config, ssh, openVPN and other security tasks
Where can you find a list of services and associated ports?
/etc/services
Telnet shouldn’t be used for remote access nowadays, however it is still useful. How?
As a troubleshooting tool, to check ports are open. Also to check the response from the server when clients access the port - is the server giving away more information than is necessary?
Which tool can check which ports are open, listening or have active connections.
netstat
netstat -ltn #listening tcp ports
netstat -lun #listening udp ports
the ss tool can also do this, but it is not covered in this exam.
What is netcat (or nc)
a network tool that can listen and connect to ports over the network. It can also be used to do a rudimentary port scan e.g. to
nc -vz localhost 100-200
How would you scan localhost for open TCP ports in the range 50 to 150 with nmap
nmap -sT -p 50-150 localhost
How would you scan localhost for open UDP ports in the range 50 to 150 with nmap
nmap -sU -p 50-150 localhost
How can you use nmap to try to identify the operating system on a machine on your network.
use nmap fingerprinting -A switch e.g.
nmap -A localhost
What is openvas (www.openvas.org)?
An opensource application that can detect vulnerabilities on your linux system. It receives network vulnerability updates (NVT) daily, so it is able to provide up-to-date testing.
How would you install OpenVAS on Debian?
sudo apt-get install openvas-server
How would you install OpenVAs on Redhat
yum install openvas
Which port does the openvas tool webserver run on
Port 9392
What is fail2ban
An intrusion detection application that monitors log files and blocks IP addresses for failed authentication attempts
What is the fail2ban config file
The main config is jail.conf, user defined options in jail.local
What is SNORT
Snort is a network intrusion detection system. It is placed on the network where is can see all traffic and monitors the traffic for intrusion attempts.
Snort has 3 modes, what are they
- Sniffer (dumps all packets to the network)
- Packet logger (logs all packets to a file)
- NIDS - Intrusion detection - reports intrusion attempts
Where is the Snort config utility and what is it called?
/etc/snort/snort.conf
What is the HOME_NET Snort variable used to define?
HOME_NET is used to defined the local network ranges to monitor
What is the EXTERNAL_NET Snort variable used to define?
EXTERNAL_NET is used to defined the external network ranges to monitor
Snort rules format?
action protocol address direction address options
e.g.
alert icmp any any -> 192.168.10.0/24 any (msg: “Ping traffic detected”
Snort rules can be quite complex - luckily there is a package of predefined snort rules called..
pulledpork
What is NAT?
Network address translation
How does NAT help security?
It hides internal IP addresses from external networks
What are the 3 IP ranges used for private IP addressing
- 0.0.0 - 10.255.255.255
- 16.0.0 - 172.31.255.255
- 168.0.0 - 192.168.255.255
IPv6 defines link local addresses as standard how do these addresses start?
fe80:
The Linux kernal uses an internal process called {answer] to process network packets
chains
What are the 5 linux chains used to process packets in iptables
- PREROUTING before decision making
- INPUT packets destined for local system
- FORWARD handles packets being forwarded
- POSTROUTING handles packets being sent to remote after the FORWARD filter
- OUTPUT handles packets output from the local system
What are the 3 types of tables in iptables?
- FILTER - apply filter rules to allow or block
- MANGLE - apply rules to change the packet
- NAT - apply rules to change the address
iptables command-line option to add a new rule
-A
iptables command-line option to delete a rule
-D