SlideShare a Scribd company logo
App Sec Workshop 
by Chris Hamm
Background 
Name: Chris Hamm 
Life before CNET 
» Was in 151st/387th Infantry and MP unit for Army National Guard 
– Training in intelligence gathering and physical security. 
» Research and development for University of Louisville ITRC working on communication 
package for Public Safety funded by DHS. Familiarized with DoD/NSA/FBI security 
measures, standards, and equipment. 
Now 
» General interest in infoSec 
» Member of 502Sec group
Agenda 
» Basics in Security 
» Why you should you be worried? - Threat modeling 
» Code in security - examples of 
» Tools? 
» Questions
Basics in Info Security - All Info security revolves around managing 3 things 
» Availability 
– Can you get to your sh*t? 
» Integrity 
– Can you believe what you see? 
» Confidentiality 
– Anything we don’t want others knowing about 
The denial or disruption of any of these items and an attacker was basically successful. So 
what happens is there must be a ranking of how much of an impact something has in order to 
prioritize it.
Basics in Info Security - It is all about risk management 
» Vulnerability * Probability * Impact = RISK 
» How do you gather this information to determine RISK? 
» Answer = Threat Modeling 
» Understanding the threats will help you see how important security 
and how you might mitigate(*control) the risk of said threat.
Threat Modeling - Starting point 
» Threat statement 
» $ACTOR 
» does $ACTION 
» to $ASSET 
» resulting in $OUTCOME 
» because of $MOTIVATION
Threat Modeling - $ACTOR 
» NATION State 
» Organized Crime 
» Insiders 
» Hackavist - LulzSec 
» Script Kiddie 
» Competing Sites and bloggers 
» ..... {Exercise: Insert Here}.....
Threat Modeling - $ACTION 
» DDoS 
» Injections 
– OS level 
– SQL 
» XSS 
» ..... {Exercise: Insert Here}.....
Threat Modeling - $ASSET 
» Content 
» Subscription Service 
» User log in 
» NGINX 
» Varnish 
» Mongo 
» ..... {Exercise: Insert Here}.....
Threat Modeling - $OUTCOME 
» Release of code 
» Spoofing as us 
» Tampering with existing content 
» Gain foothold to Pivot 
» ..... {Exercise: Insert Here}.....
Threat Modeling - $MOTIVATION 
» Make money 
» Gain notability 
» ..... {Exercise: Insert Here}.....
Code in security - INSECURE Framework 
» Injectable 
» Spoofable 
» Errors and Exceptions (un/ms- handled) 
» Unsafe/Unused functions/Routines 
» Reversible 
» Elevated Privileges
Code in security - Injectable 
» Inadequate or improperly input validation/sanitization 
» Input (data) can be executed 
» Dynamic query construction using user input 
» Examples: 
– OS level executable code 
– SQL/DB injection
Code in security - Spoofable 
» Allows Identity Impersonation 
» Credentials 
– Weak 
– Hard coded 
– Cached 
» Predictable Session Identifiers 
– Hacking and Replay
Code in security - Errors and Exceptions (un/ms- handled) 
» Verbose Error Messages 
» Unhandled Exception (No catch at all) 
» Throwing stack trace 
» Fail open - (*you allow authentication anyway)
Code in security - Unsafe/Unused functions/Routines 
» Banned/Insecure APIs 
» Unknown APIs and Interfaces 
» Vestigial functions (*CMD - C/X, CMD - P) 
» Easter Eggs
Code in security - Reversible 
» Unobfuscated 
» Textual information 
» Symbolic Information
Code in security - Elevated Privileges 
» Carry out functions or access items that should only be allowed by 
administrator. 
» Runs privileged operations without authorization checks
Code in security - Defenses 
» Injection defense 
– Input validation/ Sanitization 
– Parameterization of Queries 
– Don’t allow to exec 
» Spoofing defense 
– Avoid impersonation context code 
– Do not hardcode credentials 
– Session management - Non guessable/ non predictable session 
ids. 
» Errors & Exception mis/un - handling defense 
– Simple to the point error messages without unsafe info 
– Catch-all exception handle 
– Redirect to unified error handling place
Code in security - Defenses Cont 
» Unsafe/Unused Functions defense 
– Replace banned API with safer one 
– Delete unused functions/procedures 
– Delete Dangling Code (don’t just comment out) 
– Easter Egg Hunt 
» Reversible Code defense 
– Obfuscate 
– Application hardening - Remove textual and sym information 
» Elevated Privileges defense 
– Check authorization before allowing privilege ops 
– Non-admin accounts used for code execution 
– Test code in simulated environments
Code in security - Conclusion 
» By knowing how to Code insecurity can impact us we can can look at Coding in Security. 
» Are you going to 
– Code Insecurely (or) 
– Code In Security
References 
» Common Weakness Enumeration 
– http://cwe.mitre.org/index.html 
» How to write insecure code - Source OWASP 
– https://www.owasp.org/index.php/How_to_write_insecure_code 
» Code Insecurity or Code in Security by Mano dash4rk Paul - DerbyCon 4.0 
– https://www.youtube.com/watch?v=fu4_7sJv-ro& 
index=96&list=PLNhlcxQZJSm8o9c_2_iDDTV6tCPdMp5dg 
» Threat Modeling for Realz by Bruce Potter - DerbyCon 4.0 
– https://www.youtube.com/watch?v=WKgD305OFAQ&index=101&list=PLNhlcxQZJ 
Sm8o9c_2_iDDTV6tCPdMp5dg
Questions??

More Related Content

PDF
Threat Detection using Analytics & Machine Learning
PDF
OWASP Secure Coding Practices - Quick Reference Guide
ODP
Break it while you make it: writing (more) secure software
PPTX
Application Security - Myth or Fact Slides
PPTX
Secure coding guidelines
PPTX
AlienVault Brute Force Attacks- Keeping the Bots at Bay with AlienVault USM +...
PPT
The Principles of Secure Development - David Rook
PDF
OWASP Top 10 A4 – Insecure Direct Object Reference
Threat Detection using Analytics & Machine Learning
OWASP Secure Coding Practices - Quick Reference Guide
Break it while you make it: writing (more) secure software
Application Security - Myth or Fact Slides
Secure coding guidelines
AlienVault Brute Force Attacks- Keeping the Bots at Bay with AlienVault USM +...
The Principles of Secure Development - David Rook
OWASP Top 10 A4 – Insecure Direct Object Reference

What's hot (20)

PPTX
Secure coding practices
PDF
Secure development in .NET with EPiServer Solita
PPTX
The impact of sqli (sql injection)
PDF
A5-Security misconfiguration-OWASP 2013
PPT
PHP Security Basics
PPTX
Career In Information security
PPTX
NTXISSACSC2 - Next-Generation Security and the Problem of Exploitation by Mat...
PDF
Reducing cyber risks in the era of digital transformation
PPT
Web Application Security Testing
PDF
Secure code
PDF
Finacle - Secure Coding Practices
PPTX
A5: Security Misconfiguration
PPT
Survey Presentation About Application Security
PDF
Secure Coding for Java - An Introduction
PPTX
Secure coding practices
ODP
Introduction to OWASP & Web Application Security
PDF
OWASP Top Ten in Practice
PPTX
NTXISSACSC2 - Threat Modeling Part 1 - Overview by Brad Andrews
PDF
Developing a Threat Modeling Mindset
PDF
Web Development Security
Secure coding practices
Secure development in .NET with EPiServer Solita
The impact of sqli (sql injection)
A5-Security misconfiguration-OWASP 2013
PHP Security Basics
Career In Information security
NTXISSACSC2 - Next-Generation Security and the Problem of Exploitation by Mat...
Reducing cyber risks in the era of digital transformation
Web Application Security Testing
Secure code
Finacle - Secure Coding Practices
A5: Security Misconfiguration
Survey Presentation About Application Security
Secure Coding for Java - An Introduction
Secure coding practices
Introduction to OWASP & Web Application Security
OWASP Top Ten in Practice
NTXISSACSC2 - Threat Modeling Part 1 - Overview by Brad Andrews
Developing a Threat Modeling Mindset
Web Development Security
Ad

Similar to App sec - code insecurity basics (20)

PPTX
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)
PPTX
chap-1 : Vulnerabilities in Information Systems
PPTX
Week Topic Code Access vs Event Based.pptx
PPT
InfoSecConcepts.ppt
PDF
How to Destroy a Database
PPTX
OWASP_Training.pptx
PDF
Application Threat Modeling In Risk Management
PPTX
Web Security Overview
PPT
Intro to-ssdl--lone-star-php-2013
PPTX
Application Security: What do we need to know?
PPT
Essentials Of Security
 
PPT
Information security introduction
PPTX
Built-in Security Mindfulness for Software Developers
PPTX
Threat Modeling - Locking the Door to Vulnerabilities
PDF
Health Information Privacy and Security
PPT
software-security-intro-220901084730-8ed673b9.ppt
PDF
Justifying IT Security: Managing Risk
PPTX
Modernizing, Migrating & Mitigating - Moving to Modern Cloud & API Web Apps W...
PDF
Course Slides for CS_6035_01_Security Mindset (1)
PPT
PBL PROJECT - B2- (54,56,50,40) (2) (1).ppt
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)
chap-1 : Vulnerabilities in Information Systems
Week Topic Code Access vs Event Based.pptx
InfoSecConcepts.ppt
How to Destroy a Database
OWASP_Training.pptx
Application Threat Modeling In Risk Management
Web Security Overview
Intro to-ssdl--lone-star-php-2013
Application Security: What do we need to know?
Essentials Of Security
 
Information security introduction
Built-in Security Mindfulness for Software Developers
Threat Modeling - Locking the Door to Vulnerabilities
Health Information Privacy and Security
software-security-intro-220901084730-8ed673b9.ppt
Justifying IT Security: Managing Risk
Modernizing, Migrating & Mitigating - Moving to Modern Cloud & API Web Apps W...
Course Slides for CS_6035_01_Security Mindset (1)
PBL PROJECT - B2- (54,56,50,40) (2) (1).ppt
Ad

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
history of c programming in notes for students .pptx
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
AI in Product Development-omnex systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
System and Network Administraation Chapter 3
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Essential Infomation Tech presentation.pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
history of c programming in notes for students .pptx
Odoo POS Development Services by CandidRoot Solutions
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Reimagine Home Health with the Power of Agentic AI​
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
AI in Product Development-omnex systems
Operating system designcfffgfgggggggvggggggggg
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms II-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
Softaken Excel to vCard Converter Software.pdf
System and Network Administraation Chapter 3
Upgrade and Innovation Strategies for SAP ERP Customers
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Essential Infomation Tech presentation.pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...

App sec - code insecurity basics

  • 1. App Sec Workshop by Chris Hamm
  • 2. Background Name: Chris Hamm Life before CNET » Was in 151st/387th Infantry and MP unit for Army National Guard – Training in intelligence gathering and physical security. » Research and development for University of Louisville ITRC working on communication package for Public Safety funded by DHS. Familiarized with DoD/NSA/FBI security measures, standards, and equipment. Now » General interest in infoSec » Member of 502Sec group
  • 3. Agenda » Basics in Security » Why you should you be worried? - Threat modeling » Code in security - examples of » Tools? » Questions
  • 4. Basics in Info Security - All Info security revolves around managing 3 things » Availability – Can you get to your sh*t? » Integrity – Can you believe what you see? » Confidentiality – Anything we don’t want others knowing about The denial or disruption of any of these items and an attacker was basically successful. So what happens is there must be a ranking of how much of an impact something has in order to prioritize it.
  • 5. Basics in Info Security - It is all about risk management » Vulnerability * Probability * Impact = RISK » How do you gather this information to determine RISK? » Answer = Threat Modeling » Understanding the threats will help you see how important security and how you might mitigate(*control) the risk of said threat.
  • 6. Threat Modeling - Starting point » Threat statement » $ACTOR » does $ACTION » to $ASSET » resulting in $OUTCOME » because of $MOTIVATION
  • 7. Threat Modeling - $ACTOR » NATION State » Organized Crime » Insiders » Hackavist - LulzSec » Script Kiddie » Competing Sites and bloggers » ..... {Exercise: Insert Here}.....
  • 8. Threat Modeling - $ACTION » DDoS » Injections – OS level – SQL » XSS » ..... {Exercise: Insert Here}.....
  • 9. Threat Modeling - $ASSET » Content » Subscription Service » User log in » NGINX » Varnish » Mongo » ..... {Exercise: Insert Here}.....
  • 10. Threat Modeling - $OUTCOME » Release of code » Spoofing as us » Tampering with existing content » Gain foothold to Pivot » ..... {Exercise: Insert Here}.....
  • 11. Threat Modeling - $MOTIVATION » Make money » Gain notability » ..... {Exercise: Insert Here}.....
  • 12. Code in security - INSECURE Framework » Injectable » Spoofable » Errors and Exceptions (un/ms- handled) » Unsafe/Unused functions/Routines » Reversible » Elevated Privileges
  • 13. Code in security - Injectable » Inadequate or improperly input validation/sanitization » Input (data) can be executed » Dynamic query construction using user input » Examples: – OS level executable code – SQL/DB injection
  • 14. Code in security - Spoofable » Allows Identity Impersonation » Credentials – Weak – Hard coded – Cached » Predictable Session Identifiers – Hacking and Replay
  • 15. Code in security - Errors and Exceptions (un/ms- handled) » Verbose Error Messages » Unhandled Exception (No catch at all) » Throwing stack trace » Fail open - (*you allow authentication anyway)
  • 16. Code in security - Unsafe/Unused functions/Routines » Banned/Insecure APIs » Unknown APIs and Interfaces » Vestigial functions (*CMD - C/X, CMD - P) » Easter Eggs
  • 17. Code in security - Reversible » Unobfuscated » Textual information » Symbolic Information
  • 18. Code in security - Elevated Privileges » Carry out functions or access items that should only be allowed by administrator. » Runs privileged operations without authorization checks
  • 19. Code in security - Defenses » Injection defense – Input validation/ Sanitization – Parameterization of Queries – Don’t allow to exec » Spoofing defense – Avoid impersonation context code – Do not hardcode credentials – Session management - Non guessable/ non predictable session ids. » Errors & Exception mis/un - handling defense – Simple to the point error messages without unsafe info – Catch-all exception handle – Redirect to unified error handling place
  • 20. Code in security - Defenses Cont » Unsafe/Unused Functions defense – Replace banned API with safer one – Delete unused functions/procedures – Delete Dangling Code (don’t just comment out) – Easter Egg Hunt » Reversible Code defense – Obfuscate – Application hardening - Remove textual and sym information » Elevated Privileges defense – Check authorization before allowing privilege ops – Non-admin accounts used for code execution – Test code in simulated environments
  • 21. Code in security - Conclusion » By knowing how to Code insecurity can impact us we can can look at Coding in Security. » Are you going to – Code Insecurely (or) – Code In Security
  • 22. References » Common Weakness Enumeration – http://cwe.mitre.org/index.html » How to write insecure code - Source OWASP – https://www.owasp.org/index.php/How_to_write_insecure_code » Code Insecurity or Code in Security by Mano dash4rk Paul - DerbyCon 4.0 – https://www.youtube.com/watch?v=fu4_7sJv-ro& index=96&list=PLNhlcxQZJSm8o9c_2_iDDTV6tCPdMp5dg » Threat Modeling for Realz by Bruce Potter - DerbyCon 4.0 – https://www.youtube.com/watch?v=WKgD305OFAQ&index=101&list=PLNhlcxQZJ Sm8o9c_2_iDDTV6tCPdMp5dg