Skip to content

Instantly share code, notes, and snippets.

@pengux
Created April 19, 2016 06:27
Show Gist options
  • Select an option

  • Save pengux/725458c2c46cada216169b019474ea77 to your computer and use it in GitHub Desktop.

Select an option

Save pengux/725458c2c46cada216169b019474ea77 to your computer and use it in GitHub Desktop.
Talks - War Games 01

War Games 01, Computer Security and Hacking

We are at war

  • Blackhat, Whitehat, government, activists hackers constantly trying to get access to computers and data. Sony, Panama Documents, USA, Philippines
  • Reasons can be money, political, religious, military, love, whatever...
  • Computers are weapons and also targets. Data source, botnet, proxy, spam, DDOS
  • Always need to think about security and common sense goes a long way!

Basic server security

SSH

  • Secure Shell, a network protocol with encryption. Commonly use to accessing remote hosts.
  • Passwords are insecure, compared to a private key, it's short. Turn off passwords login!
  • Generate a new SSH keypair
  • Never transfer your private key over the wire! Consider it compromised otherwise. Can use multiple keys, ~/.ssh/config
  • SSH can be used for many other things. ssh chat.shazow.net
  • A firewall to block traffic
  • Should drop all traffic by default, and only allowing the ports that you need e.g. SSH, HTTP/HTTPS.
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 1 -i lo -j ACCEPT
sudo iptables -P INPUT DROP
  • Save the rules with iptables-persistent!
sudo apt-get install iptables-persistent
  • UFW is a front-end for iptables

Encrypt all things!

Antivirus

  • ClamAV is open source
  • Firewall is more important than antivirus on server
  • Use top or pidstat 1 to check for suspicous processes taking up resources on server
  • Update your system regularly!

Other security tips

  • Update system regularly
  • Follow security annoucements and patch 0day exploits!
  • Give minimum privileges to all users
  • Be paranoid!
  • Put tape over your webcam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment