Skip to content

Instantly share code, notes, and snippets.

@eugeneteo
Last active July 19, 2016 10:37
Show Gist options
  • Save eugeneteo/a84dc4a9d6d67780485f5727438181bf to your computer and use it in GitHub Desktop.
Save eugeneteo/a84dc4a9d6d67780485f5727438181bf to your computer and use it in GitHub Desktop.
AY2016/17 Semester 1 NSCSM CDRE - Topic 8b

AY2016/17 Semester 1 NSCSM IT8002 CDRE

IT8002: CYBER DEFENCE AND RANGE EXERCISES

Topic 8b - Linux and Apache Security

Instructor: Eugene Teo

Lecture 8b

  • Slide 3: Why Open Source misses the point of Free Software
    • "Open source is a development methodology; free software is a social movement. For the free software movement, free software is an ethical imperative, essential respect for the users' freedom. By contrast, the philosophy of open source considers issues in terms of how to make software “better”—in a practical sense only."
    • Four Freedoms of Free Software
  • Slide 7: Kernel space: ring0; Userspace: ring3
  • Slide 11: ps aux (BSD syntax); ps -ef (SysV syntax)
  • Slide 16: RSA vs. DSA for SSH authentication keys
  • Slide 21: [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/chap-Security-Enhanced_Linux-Introduction.html](Mandatory Access Control model)
  • "Security-Enhanced Linux (SELinux) adds Mandatory Access Control (MAC) to the Linux kernel, and is enabled by default in Red Hat Enterprise Linux. A general purpose MAC architecture needs the ability to enforce an administratively-set security policy over all processes and files in the system, basing decisions on labels containing a variety of security-relevant information. When properly implemented, it enables a system to adequately defend itself and offers critical support for application security by protecting against the tampering with, and bypassing of, secured applications. MAC provides strong separation of applications that permits the safe execution of untrustworthy applications. Its ability to limit the privileges associated with executing processes limits the scope of potential damage that can result from the exploitation of vulnerabilities in applications and system services. MAC enables information to be protected from legitimate users with limited authorization as well as from authorized users who have unwittingly executed malicious applications."
  • Slide 41: Using HTTPS as a ranking signal
  • "[...] we're starting to use HTTPS as a ranking signal. For now it's only a very lightweight signal — affecting fewer than 1% of global queries, and carrying less weight than other signals such as high-quality content — while we give webmasters time to switch to HTTPS. But over time, we may decide to strengthen it, because we’d like to encourage all website owners to switch from HTTP to HTTPS to keep everyone safe on the web."
  • HTTPS is not a magic bullet for Web security

Practical 8b

  • Ex1-4: The su Command
  • "If the first argument is a hyphen, the current directory and environment will be changed as if the new user had actually logged on to a new session (rather than taking over an existing session)"
  • Ex1-5: ps -ef (SysV syntax - dev by AT&T, e.g. Solaris); ps aux (BSD syntax - dev by UBerkeley, e.g. Linux's BSD-like options)
  • Ex2-8: Shift+gg, o, Esc+:wq
  • Ex2-12: tail -1 /etc/passwd
  • Ex3-13: Important step
  • Ex3-15: Allows student to run any command on any host
  • Ex4-22: -t - TCP; -u - UDP; -n - Numeric; -a - All (both listening and non-listening sockets); -p - Program/PID (requires root privileges)
  • Ex4-29:
  • lokkit -p 8222:tcp --update
  • less /etc/sysconfig/system-config-firewall
  • iptables -L -n | grep 'tcp.*8222'
  • Ex4-30:
  • iptables -D INPUT -m state --state NEW -p tcp --dport 8222 -j ACCEPT or
  • iptables -L --line-numbers; iptables -D INPUT #
  • Ex6-43: lokkit -p 80:tcp --update
  • Ex8-54: mod_ssl depends on apr, apr-util, httpd, httpd-tools, and mailcap

THE END

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment