Memory Corruption

You have learned the many ways to sanitize input in your app. It is time now to turn your attention to mitigating another major application security risk: memory corruption.

4 videos  //  45 minutes of training

Course description

Managing memory usage has long been a requirement for application development. Unfortunately, most developers don’t do it very well. This can lead to leaks, overflows, and crashes in your app. Hackers can exploit these vulnerabilities with denial-of-service and remote code execution attacks. In this course, you will learn how mobile app memory is structured and used. You will learn about the most common overflow types, the errors that cause them, and how to avoid them. You will explore what pointers are, the various types of pointers, and how Swift provides special pointer types to help your code integrate more safely with Objective-C. You will also deliberately create a buffer overflow to observe the effect it has on your code.

Course syllabus

iOS Memory OverviewDuration: 14:09

In this segment, we examine the structure of computer memory and how memory addresses are used by your app. We also examine iOS Automatic Reference Counting, how Swift manages memory and the problem of retain cycles and how to break them.

Swift PointersDuration: 8:58

In this segment, we learn what pointers are, the various pointer types in Swift and how Swift uses unsafe pointers to help you write memory-safe code.

Understanding OverflowsDuration: 13:29

In this segment, we learn about app memory structure. We examine the different types of overflows including buffer, heap, stack and integer. We see examples in Swift and how to use the range contains() method and other mechanisms to mitigate the risk.

Activity: Creating a Buffer OverflowDuration: 8:30

In this example, we call a vulnerable C function to cause a buffer overflow and crash an app.

Meet the author

Chrys Thorsen

LinkedIn

Chrys Thorsen is a technology and education consultant with 25 years of experience. Her work has taken her around the U.S. and overseas, including as a contractor for the CDC using technology to help fight HIV/AIDS in Africa. During her career, she has acquired 40 IT certifications, authored over 25 textbooks on a wide range of IT subjects, including secure iOS and Android coding, and created an equal number of IT-related video courses. When not working, Chrys enjoys reading scientific articles and experimenting with Internet-of-Things devices. She currently lives in Virginia with her sister, her cat and her dog which, as she describes it, "have the worst sibling rivalry imaginable."

Plans & pricing

Infosec Skills Personal

  • 190+ role-guided learning paths (e.g., Ethical Hacking, Threat Hunting)
  • 100s of hands-on labs in cloud-hosted cyber ranges
  • Custom certification practice exams (e.g., CISSP, Security+)
  • Skill assessments
  • Infosec peer community support

Infosec Skills Teams

$799 per license / year

Book a Meeting
  • Team administration and reporting
  • Dedicated client success manager
  • Single sign-on (SSO)
    Easily authenticate and manage your learners by connecting to any identity provider that supports the SAML 2.0 standard.
  • Integrations via API
    Retrieve training performance and engagement metrics and integrate learner data into your existing LMS or HRS.
  • 190+ role-guided learning paths and assessments (e.g., Incident Response)
  • 100s of hands-on labs in cloud-hosted cyber ranges
  • Create and assign custom learning paths
  • Custom certification practice exams (e.g., CISSP, CISA)
  • Optional upgrade: Guarantee team certification with live boot camps

Award-winning training that you can trust

IDC MarketScape Leader: U.S. IT Training

IDC MarketScape Leader: U.S. IT Training

Infosec Skills

eLearning Content

eLearning Content

Infosec Skills

Best Product - Cybersecurity Training for Infosec Professionals

Best Product - Cybersecurity Training for Infosec Professionals

Infosec Skills

Security Education & Platform

Security Education & Platform

Infosec Skills

Ranked #52 in Top 100 Global Software Sellers

Ranked #52 in Top 100 Global Software Sellers

Infosec