SlideShare a Scribd company logo
Computer Security Management
(ISYS20261)
Lecture 8 - Network-based Attacks (3)




 Module Leader: Dr Xiaoqi Ma
 School of Science and Technology
Last week …

• IP address spoofing
• Man-in-the-middle attack
• Denial-of-service attack (DoS)
  – SYN flooding
  – Smurf attack
  – Distributed Denial of Service attack (DDoS)




Computer Security Management
Page 2
Today ...

• OS-based attacks
• Buffer overflows
• Stack smashing
• Dangling and wild pointers
• Password attacks




Computer Security Management
Page 3
OS-based attacks

• Attackers often look for
  – Unpatched operating systems
  – Badly designed application software

• Why?
  – known vulnerabilities can easily be exploited

• Attacker can then steal, copy, or manipulate data
• Once the OS and services running on the system have been
  identified the attacker can mount a number of attacks:
  – Stack smashing
  – Buffer overflows
  – Password attacks
  – Etc.



Computer Security Management
Page 4
Buffer overflows

• Program tries to write data beyond the bounds of allocated memory
• If not detected and managed by the program data is written in an
  unexpected location, causing unexpected results
• Problems:
  – Often the program will abort
  – The overflow can cause data to be written to a memory-mapped file
  – Overflow can cause security problems through stack-smashing attacks

• Example:               // ...
                         int *ptr;
                         int idx=500;

                         ptr = new int[500];

                         ptr[idx]=255;

                         // ...


Computer Security Management
Page 5
Processes in memory




Computer Security Management
Page 6
Heap attacks

• Buffer overflow occurs in the dynamically allocated data in the heap
  at runtime
• Memory on the heap is dynamically allocated by the application at
  run-time and typically contains program data
• Exploitation is performed by corrupting this data in specific ways to
  cause the application to overwrite internal structures
• Can be used for example to mount a denial-of-service attack




Computer Security Management
Page 7
Stacks

• Stack: data structure that works on the last-in-first-out (LIFO)
  principle

                                    push
                                    pop
                               17              17



                                     17     Storage
                                              for n
                                    255
                                              data
                                    166      items
                                     45
                                     0
                                     99



Computer Security Management
Page 8
Stack overflow

• Trying to push a data item onto a stack that is full:



                                push
                           17

                                128
                                 0
                                17         Storage
                                             for n
                                255
                                             data
                                166         items
                                45
                                 0
                                99



Computer Security Management
Page 9
Stack underflow

• Trying to pop a data item from an empty stack:



                               push




                                        Storage
                                          for n
                                          data
                                         items




Computer Security Management
Page 10
Call stack (1)

• Stores information about the active subroutines (functions) of a
  computer program
• Keeps track of the point to which each active subroutine should
  return control when it finishes executing
• Stores also local variables and parameters (arguments)
• Implementation is machine dependent
• Stores special data structures called stack frames or activation
  records




Computer Security Management
Page 11
Call stack (2)

      stack pointer
                               local variables

      frame pointer            return address    stack frame for function n+1

                                parameters


                               local variables

                               return address     stack frame for function n

                                parameters




Computer Security Management
Page 12
Stack smashing attack

• Tries to insert arbitrary code into the program to be executed
• Attacker purposely overflows a stack to get access to forbidden
  regions of computer memory
• Often used to redirect thread of control to shell, which can then be
  used to execute commands on the target system




Computer Security Management
Page 13
Dangling and wild pointers

• Pointers that do not point to a valid object of the appropriate type
• Dangling pointers arise when an object is deleted or deallocated,
  without modifying the value of the pointer, so that the pointer still
  points to the memory location of the deallocated memory
• If system reallocate the previously freed memory to another process
  and the original program dereferences the dangling pointer,
  unpredictable behaviour may result, as the memory may now
  contain completely different data
• Wild pointers arise when a pointer is used prior to initialisation to
  some known state
• They show the same erratic behaviour as dangling pointers, though
  they are less likely to stay undetected

Computer Security Management
Page 14
Password attacks

• Passwords are most common form of authentication of users to an
  OS
• Password attacks are most common mode of attack against an OS
• Often default passwords are unchanged: if known it is easy to break
  into system
• Other methods
  – Guessing
  – Dictionary attack
  – Brute-force attack




Computer Security Management
Page 15
Password guessing

• Passwords are sequences of symbols associated with a user name
• Provide a mechanism for identification and authentication of a
  particular user
• Unique and grant privileges only to the account's owner
• If users can choose their own password sequences they tent to use
  sequences they can remember easily, e.g. pet names, birth places,
  etc.
• Attacker can easily guess passwords!
• Password policy: set of rules designed to enhance computer security
  by encouraging users to employ strong passwords and use them
  properly


Computer Security Management
Page 16
Dictionary attack

• Steal password file from the target machine
• Parsing a word file (dictionary)
• Encrypting or hashing that word (depending on the target system)
• Comparing the result to the encrypted or hashed password from the
  victim machine
• If the comparison matches: password found
• Difficult if the correct algorithm is not known or if attacker has not
  access to the encrypted password file




Computer Security Management
Page 17
Brute-force attack

• Similar to dictionary attack but uses all possible combinations of
  letters, numbers, and special characters
• Computationally expensive
• Unlikely to succeed unless password is very small




Computer Security Management
Page 18
Next week …

… we will continue to look at web application attacks




Computer Security Management
Page 19

More Related Content

PPT
Isys20261 lecture 03
PPT
Isys20261 lecture 09
PPT
Isys20261 lecture 06
PPT
Isys20261 lecture 01
PPTX
Lecture 5&6 corporate architecture
PDF
RIoT (Raiding Internet of Things) by Jacob Holcomb
PDF
InfluxEnterprise Architectural Patterns by Dean Sheehan, Senior Director, Pre...
PDF
Workshop: Big Data Visualization for Security
Isys20261 lecture 03
Isys20261 lecture 09
Isys20261 lecture 06
Isys20261 lecture 01
Lecture 5&6 corporate architecture
RIoT (Raiding Internet of Things) by Jacob Holcomb
InfluxEnterprise Architectural Patterns by Dean Sheehan, Senior Director, Pre...
Workshop: Big Data Visualization for Security

Similar to Isys20261 lecture 08 (20)

PDF
All Your Security Events Are Belong to ... You!
PDF
All your logs are belong to you!
PPTX
Windows XP operating system
PPTX
Blackhat USA 2016 - What's the DFIRence for ICS?
PPTX
You Can't Correlate what you don't have - ArcSight Protect 2011
PDF
Sebastián Guerrero - Ke ase Android? [Rooted CON 2013]
PDF
Workshop - Linux Memory Analysis with Volatility
PPTX
InfluxEnterprise Architecture Patterns by Tim Hall & Sam Dillard
PDF
Cyber Threat Ranking using READ
PDF
Transparent Data Encryption in PostgreSQL
PDF
Blackhat USA 2011 - Cesar Cerrudo - Easy and quick vulnerability hunting in W...
PPTX
Why Disk Level Encryption is Not Enough for Your IBM i
PDF
Advanced Windows Exploitation
PPTX
Getting Started with Splunk Break out Session
PDF
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
PDF
18CS2005 Cryptography and Network Security
PPTX
Hacking - penetration tools
PPTX
Delivering Security Insights with Data Analytics and Visualization
PDF
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
PPT
Security architecture
All Your Security Events Are Belong to ... You!
All your logs are belong to you!
Windows XP operating system
Blackhat USA 2016 - What's the DFIRence for ICS?
You Can't Correlate what you don't have - ArcSight Protect 2011
Sebastián Guerrero - Ke ase Android? [Rooted CON 2013]
Workshop - Linux Memory Analysis with Volatility
InfluxEnterprise Architecture Patterns by Tim Hall & Sam Dillard
Cyber Threat Ranking using READ
Transparent Data Encryption in PostgreSQL
Blackhat USA 2011 - Cesar Cerrudo - Easy and quick vulnerability hunting in W...
Why Disk Level Encryption is Not Enough for Your IBM i
Advanced Windows Exploitation
Getting Started with Splunk Break out Session
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
18CS2005 Cryptography and Network Security
Hacking - penetration tools
Delivering Security Insights with Data Analytics and Visualization
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Security architecture
Ad

More from Wiliam Ferraciolli (20)

PPTX
Lecture 12 monitoring the network
PPTX
Lecture 11 managing the network
PPTX
Lecture 10 the user experience
PPTX
Lecture 10 the user experience (1)
PPTX
Lecture 9 further permissions
PPTX
Lecture 8 permissions
PPTX
Lecture 7 naming and structuring objects
PPTX
Lecture 4 client workstations
PPTX
Lecture 3 more on servers and services
PPTX
Lecture 2 servers and services
PPTX
Lecture 1 introduction
PPTX
Lecture 13, 14 & 15 c# cmd let programming and scripting
PPT
Isys20261 lecture 14
PPT
Isys20261 lecture 12
PPT
Isys20261 lecture 11
PPT
Isys20261 lecture 10
PPT
Isys20261 lecture 07
PPT
Isys20261 lecture 05
PPT
Isys20261 lecture 04
PPT
Isys20261 lecture 02
Lecture 12 monitoring the network
Lecture 11 managing the network
Lecture 10 the user experience
Lecture 10 the user experience (1)
Lecture 9 further permissions
Lecture 8 permissions
Lecture 7 naming and structuring objects
Lecture 4 client workstations
Lecture 3 more on servers and services
Lecture 2 servers and services
Lecture 1 introduction
Lecture 13, 14 & 15 c# cmd let programming and scripting
Isys20261 lecture 14
Isys20261 lecture 12
Isys20261 lecture 11
Isys20261 lecture 10
Isys20261 lecture 07
Isys20261 lecture 05
Isys20261 lecture 04
Isys20261 lecture 02
Ad

Isys20261 lecture 08

  • 1. Computer Security Management (ISYS20261) Lecture 8 - Network-based Attacks (3) Module Leader: Dr Xiaoqi Ma School of Science and Technology
  • 2. Last week … • IP address spoofing • Man-in-the-middle attack • Denial-of-service attack (DoS) – SYN flooding – Smurf attack – Distributed Denial of Service attack (DDoS) Computer Security Management Page 2
  • 3. Today ... • OS-based attacks • Buffer overflows • Stack smashing • Dangling and wild pointers • Password attacks Computer Security Management Page 3
  • 4. OS-based attacks • Attackers often look for – Unpatched operating systems – Badly designed application software • Why? – known vulnerabilities can easily be exploited • Attacker can then steal, copy, or manipulate data • Once the OS and services running on the system have been identified the attacker can mount a number of attacks: – Stack smashing – Buffer overflows – Password attacks – Etc. Computer Security Management Page 4
  • 5. Buffer overflows • Program tries to write data beyond the bounds of allocated memory • If not detected and managed by the program data is written in an unexpected location, causing unexpected results • Problems: – Often the program will abort – The overflow can cause data to be written to a memory-mapped file – Overflow can cause security problems through stack-smashing attacks • Example: // ... int *ptr; int idx=500; ptr = new int[500]; ptr[idx]=255; // ... Computer Security Management Page 5
  • 6. Processes in memory Computer Security Management Page 6
  • 7. Heap attacks • Buffer overflow occurs in the dynamically allocated data in the heap at runtime • Memory on the heap is dynamically allocated by the application at run-time and typically contains program data • Exploitation is performed by corrupting this data in specific ways to cause the application to overwrite internal structures • Can be used for example to mount a denial-of-service attack Computer Security Management Page 7
  • 8. Stacks • Stack: data structure that works on the last-in-first-out (LIFO) principle push pop 17 17 17 Storage for n 255 data 166 items 45 0 99 Computer Security Management Page 8
  • 9. Stack overflow • Trying to push a data item onto a stack that is full: push 17 128 0 17 Storage for n 255 data 166 items 45 0 99 Computer Security Management Page 9
  • 10. Stack underflow • Trying to pop a data item from an empty stack: push Storage for n data items Computer Security Management Page 10
  • 11. Call stack (1) • Stores information about the active subroutines (functions) of a computer program • Keeps track of the point to which each active subroutine should return control when it finishes executing • Stores also local variables and parameters (arguments) • Implementation is machine dependent • Stores special data structures called stack frames or activation records Computer Security Management Page 11
  • 12. Call stack (2) stack pointer local variables frame pointer return address stack frame for function n+1 parameters local variables return address stack frame for function n parameters Computer Security Management Page 12
  • 13. Stack smashing attack • Tries to insert arbitrary code into the program to be executed • Attacker purposely overflows a stack to get access to forbidden regions of computer memory • Often used to redirect thread of control to shell, which can then be used to execute commands on the target system Computer Security Management Page 13
  • 14. Dangling and wild pointers • Pointers that do not point to a valid object of the appropriate type • Dangling pointers arise when an object is deleted or deallocated, without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory • If system reallocate the previously freed memory to another process and the original program dereferences the dangling pointer, unpredictable behaviour may result, as the memory may now contain completely different data • Wild pointers arise when a pointer is used prior to initialisation to some known state • They show the same erratic behaviour as dangling pointers, though they are less likely to stay undetected Computer Security Management Page 14
  • 15. Password attacks • Passwords are most common form of authentication of users to an OS • Password attacks are most common mode of attack against an OS • Often default passwords are unchanged: if known it is easy to break into system • Other methods – Guessing – Dictionary attack – Brute-force attack Computer Security Management Page 15
  • 16. Password guessing • Passwords are sequences of symbols associated with a user name • Provide a mechanism for identification and authentication of a particular user • Unique and grant privileges only to the account's owner • If users can choose their own password sequences they tent to use sequences they can remember easily, e.g. pet names, birth places, etc. • Attacker can easily guess passwords! • Password policy: set of rules designed to enhance computer security by encouraging users to employ strong passwords and use them properly Computer Security Management Page 16
  • 17. Dictionary attack • Steal password file from the target machine • Parsing a word file (dictionary) • Encrypting or hashing that word (depending on the target system) • Comparing the result to the encrypted or hashed password from the victim machine • If the comparison matches: password found • Difficult if the correct algorithm is not known or if attacker has not access to the encrypted password file Computer Security Management Page 17
  • 18. Brute-force attack • Similar to dictionary attack but uses all possible combinations of letters, numbers, and special characters • Computationally expensive • Unlikely to succeed unless password is very small Computer Security Management Page 18
  • 19. Next week … … we will continue to look at web application attacks Computer Security Management Page 19