7905ICT Mod 1-2 Lecture
7905ICT Mod 1-2 Lecture
7905ICT Mod 1-2 Lecture
Hui Tian
Griffith University
Jul. 2020
• Intro. To Cyber Security • Cryptography
• Cyber Security Attacks & OS Module 1 Module 2 • AAA protocols
attacks
1. Cyber 2. Counter-
Threats measures
Policy Technology
4. Policy and 3. Network
Governance Security
• Cyber Security Standards &
Assessment Module 4-5 Module 3 • Network security
architectures
• Social Engineering and Security
Awareness • Firewalls
• Risk Management & Governance • IDS, IPS
• Privacy & Online Rights People
1. Cyber Attacks
Objectives
worms
1. Software threats
botnets ransomware
– worm
– trojan horse program
– virus
– Ransomware keylogger virus
– Blended threats
Malware
adware rootkit
1. Software threats
Host A:
– worm {find_host(h);
– trojan horse program rcopy (worm, h)
– virus rexec(worm, h)}
– Ransomware
– Blended threats Host B:
{find_host(h);
rcopy (worm, h)
rexec(worm, h)}
Host C:
{find_host(h);
rcopy (worm, h)
rexec(worm, h)}
1. Software threats
Print “type password:”
– worm Accept (password)
– trojan horse program If valid (password) then allow
– virus Print “type password:”
– Ransomware Accept (password)
– Blended threats If valid (password) or password=“ABC” then allow
Ask_permission (location
Use (location) in map
Map app becomes
Ask_permission (location) a Spyware
Send (location) to developer
Use (location) in map
File infectors
1. Software threats
Macro viruses
– worm Overwrite viruses
Polymorphic viruses
– trojan horse program Resident viruses
– virus Human action involved in spreading Rootkit viruses
– Ransomware System or boot-record infectors
…….
– Blended threats
Signs of being infected:
Macro viruses
1. Software threats • Macros are keystrokes that are
– worm embedded in docs or saved seq for
– trojan horse program
commands.
• Add malicious code to the genuine
– virus
macro sequences.
– Ransomware
• Office 2016 allows security
– Blended threats managers to selectively enable
File infectors: macro use.
• Attached with program files, eg. com/exe files Overwrite viruses
• Some viruses infect any program for which • target specific files or applications
execution is requested, including .sys, .ovl, .prg, • systematically overwrite all files
and .mnu files. Polymorphic viruses
• Some are completely included programs sent in Change or mutate its underlying code without
email attachments. changing its basic functions or features.
Escape detection and identification.
1. Software threats
Rootkit Viruses
– worm • Secretly installs an illegal rootkit on
– trojan horse program an infected system
– virus • Created to bypass antivirus
– Ransomware software
– Blended threats
System or boot-record infectors:
Resident Viruses: • Infect executable code found in
specific system areas on a disk:
• Implants itself in the memory of a computer
USB thumb drives
• Original virus program deleted, but the
DOS boot sector on
version stored in memory can be activated. diskettes
• Unnoticed by antimalware software Master Boot Record (MBR)
on hard disks
1. Software threats CryptoLocker 2013
CryptoLocker.F 2014
– worm CryptoWall 2014
– trojan horse program Fusob 2015
– virus WannaCry 2017
Petya 2017
– Ransomware Bad Rabbit 2017
– Blended threats Samsam 2016
Jigsaw 2016
https://en.wikipedia.org/wiki/Ransomware
https://www.forbes.com/sites/kateoflahertyuk/2018/08/17/h
ow-to-survive-a-ransomware-attack-and-not-get-hit-
again/#288bc46b6cd3
FacexWorm Target at Cyptocurrency
1. Software threats May 2018
Spread through facebook msgr
– worm
– trojan horse program
– virus
– Ransomware
– Blended threats
http://resources.infosecinstitute.com/crooks-exploit-facebook-spread-crypto-miner-malware/
2. Web Attacks
2. Web Attacks
XSS: Malicious website leverages bugs in trusted CSRF: When a malicious website causes a user’s
website to cause unwanted action on user’s browser to perform unwanted actions on a trusted
browser website
Attacker tries to control what the website sends to Attacker tries to control what the client bowser sent to
the client browser. the website.
Ex: Reading cookies, authentication info, code Ex: transfer money out of user’s account, harvest user
injection id, compromise user account
2. Web Attacks
Cross Site Request Forgery SELECT * FROM students WHERE studentID=100 or 1=1
Cross-Site Scripting Attack
SQL injection Attack
3. Network Attacks
Packet Sniffing
Packet Spoofing
Attacks on TCP/IP protocol
DNS Attacks
Heartbleed Bug and Attack
DDoS
4 types of hardware:
4. Hardware threats
• Information system hardware
• Physical facility Natural disasters, fire smoke,
A hardware security
• Supporting facilities water, lightning;
module (HSM) is a physical Chemical/radiological/biological
computing device that • Personnel
hazards:
safeguards and Dust;
manages digital keys for strong Infestation
authentication and 3 categories of threats:
provides cryptoprocessing. • Environmental threats Electrical power;
• Technical threats Electromagnetic inference(EMI);
• Human-caused threats HSM design;
• Design HSMs with both
symmetric and asymmetric
Unauthorized physical access;
cryptography (2048bits).
Theft
• Support ECC with a shorter Vandalism
key. Misuse
How to prevent these types of attacks?
--- Using software or other security policies to block known payloads from
launching
Password Dilemma
No change Change particular field
Password is stored in usr/etc/shadow
-rw-r----- 1 root shadow 1443 May 20 12:33 /etc/shadow
Request to change the pwd?
Password Dilemma
Two-Tier Approach!
20
Superman Story
1. Superperson + power suit
2. Superperson + power suit with Set-UID
embedded chip
3. Superperson + power suit with embedded
chip + revised code
Operating Systems
Daemon approach
Different types of privileged programs
• Daemons approach
– Program runs in the background
– Needs to run as root or other privileged
users (Windows Service approach)
• Set-UID program • Real user ID
– Widely used in Unix • Effective user ID
– Program marked by a single bit • Saved user ID
• rwxrwxrwx ==> means full privilege is available for that file OR directory
• rws tells the operating system to execute that program with the user-id of its owner, typically used
with files owned by root to allow normal users to execute them as root with no external tools (such
as sudo).
22
Set-UID concepts
• UID: Identifies real owner of process
• EUID: Identifies privilege of a process
• Access control is based on EUID
• When a normal program is executed, RUID=EUID, they both equal to the Id of the
user who runs the program
• When a Set-UID is executed, RUID≠EUID, RUID still equal to the user’s ID, but
EUID equals to the program owner’s ID
– If the program is owned by root, the program runs with root privilege
Attack surfaces of Set-UID programs
System(“ls”)
24
Set-UID Service
Functionality Similar Similar
Performance Better because doesn’t run a back Becomes better nowadays (due to
ground process (especially in old precious resource in memory and
times) computation power)
Security Broader attack surface Less attack surface because
Environment var may come from environment var are all from
normal user trusted sources
Applications Linux Windows, Android
25
Attack surfaces of Set-UID programs
• Old Unix OS has only 2 levels of privileges Android OS has more than 100
• Modern OS, provides fine-grained privileges privilege!
26
Buffer overflow attack
Stack Buffer Overflow Attack
• Before data copied from source to another place, a program needs to allocate
memory space for the destination.
• Not sufficient amount of memory is allocated.
• Cause more than crashing a program.
• May enable attackers to gain a complete control of a program.
void main ( ) Strcpy stops when it sees number zero ‘\0’
{
char src[40]=“Hello world \0 Extra string”;
char dest[40];
//copy to dest from src
strcpy (dest, src);
} 28
Stack Buffer Overflow Attack
Buffer overflow – find the address of malicious code
30
Buffer overflow – countermeasures 2^8=256 stack addresses for 32 bit android Nexus 5
• Randomize memory space (OS) 2^19=524288 stack addresses for 32 bit machine
• Safer functions: strncpy, snprintf, strncat, fgets, specify the max length of data that
can be copied to the buffer
31
Defeating buffer overflow’s countermeasures
Return-to-libc attack
32
Return-to-libc Attack
33
Race Condition Vulnerability
Race Condition Vulnerability --- Dirty Cow
Dirty cow exploits this vulnerability to change file “/etc/passwd” to gain the root privilege on the system.
35
SUMMARY
– Software attacks: worm, trojan horse program, virus, ransomware.
– Web attacks
– Network attacks
– Hardware threats
– Operating system attacks
• Set UID vs Service approach
• Buffer overflow
• Return to libc
• Race condition
Next Module
– Countermeasures
• Cryptography
• Authentication, Authorisation and Accountability protocols