SlideShare a Scribd company logo
ProdSec
A technical approach
Jeremy Brown, April 2018
Bio
โ€ข Been around for a while in the industry
โ€ข Bug hunter
โ€ข Hardening products and systems
โ€ข Tools and teams that make stuff ./
โ€ข Security Lead @ NVIDIA
โ€ข All things ProdSec, breaking/fixing and providing solutions
โ€ข Previously Microsoft (windows), Amazon (cloud) and independent consulting
Agenda
I. Intro
II. Fundamentals
III. Tooling & Automation
IV. Campaigns
V. Conclusion
Fundamentals
NVIDIA is more than just a gaming company now
Fundamentals
โ€ข Security is managing risk
โ€ข Identify
โ€ข Approach
โ€ข Mitigate
โ€ข R&D to understand and mitigate future risks
โ€ข Defense is trained by offense
* Server-only perspective, still tons of caveats
Foundations
โ€ข Vertical
โ€ข Security persons or teams in each product group
โ€ข Horizontal
โ€ข Central team that collaborates across product groups
โ€ข Hybrid
โ€ข Most companies with significant security presence fit somewhere in here
Roles
โ€ข Security devs
โ€ข Build security features or tooling, automate to scale
โ€ข Security engs
โ€ข Work with product team(s) or company-wide initiatives on reducing risk
โ€ข SecOps
โ€ข Often handle IT security, incidents, network hardening, holistic pen-testing
Roles
โ€ข Pen-testers
โ€ข Focus on internal and external testing, even red teaming and service security
โ€ข Exploiters / Researchers
โ€ข Pushing bugs to maximum potential, assessing blast radius, determining risk
โ€ข PSIRT
โ€ข Managing mostly externally reported bugs, product team fixes, public comms
All have various shades, levels and specialties in between
What are we trying to do
โ€ข Ship less bugs
โ€ข Avoid the avoidable
โ€ข Limit the blast radius
โ€ข Make attacking more difficult in the first place
โ€ข If compromise occurs, harden platform / network to mitigate advancement
โ€ข Maintain balance
โ€ข Security in lieu of usability/perf generally doesnโ€™t ship (or sell)
Relevant: https://cansecwest.com/slides/2015/Project%20Zero%20-%20making%200day%20hard%20-%20Ben%20Hawkes.pdf
Org tools at your disposal
โ€ข Culture / Policy
โ€ข โ€œWe should do itโ€ or โ€œAccording to the SDLโ€
โ€ข Alignment
โ€ข โ€œX says we need to do thisโ€
โ€ข Escalation
โ€ข โ€œYour people talk to my peopleโ€
Of course, always be nice J
Models
โ€ข Training
โ€ข Teach them how to fish, but risk losing sight of the rewards long term
โ€ข Hands-on
โ€ข Work with them every step of the way, but this is hard to scale
โ€ข On-boarding process, partnering, general visibility into org
โ€ข Opt-in only
โ€ข Must use these libraries and check these boxes, but requires culture
Hybrid models are common
MVSB
โ€ข Minimally Viable Security Bar
โ€ข The basics a dev team has to do without risking their ship getting blocked
โ€ข Eg. design review, static analysis scan, pen-test
โ€ข Negotiable, yet dedicated % of product roadmap for security activities
โ€ข Allows security to be a requirement instead of โ€˜nice to have, but no timeโ€™
Bug Hunting
โ€ข Evaluating assumptions in the productโ€™s design and implementation
โ€ข No one should ever send a large buffer, no need to check length before copy
โ€ข Local users are trusted anyways, we donโ€™t need to protect data on filesystem
โ€ข Only registered accounts can upload files and we shouldnโ€™t restrict them
โ€ข Users know they cannot insert scripts here, nothing to worry about
โ€ข We trust clients not to upload bad data, we donโ€™t need to check it beforehand
โ€ข We want users to be able to run whatever they want, weโ€™ll block the bad stuff
โ€ข The client should validate data before parsing it, thatโ€™s not the serverโ€™s job
โ€ข The service is just open to internal users, so authentication is unnecessary
โ€ข [โ€ฆ.]
Security inside
โ€ข Access to source code
โ€ข Whitebox all the things
โ€ข Reuse data for longer term initiatives to improve code quality
โ€ข Coordinated new releases with product team
Bugs are filed and queued for fix.
Security outside
โ€ข Only access to OSS, not closed products
โ€ข But as they say, if you can read assemblyโ€ฆ
โ€ข One bug may affect many different products or only certain versions
โ€ข Often negotiated disclosure
All bugs are special!
Having perspective
When someone tells you your code has bugs, you can either respond
1) โ€œWhy are they picking on us!?โ€
or
2) โ€œI wish we were more prepared, but this is good data to use and improve[โ€ฆ]โ€œ
Which one is more productive? J
Having perspective
โ€ข Vendors
โ€ข Once you release the code, package or service, itโ€™s out there
โ€ข Assume anything someone can do with it, they will
โ€ข Come to terms with
โ€ข You wrote the code, therefore you also wrote the buggy code
โ€ข Someone writing an exploit is just exercising the bug that was already there
โ€ข Better for you if they report it and itโ€™s fixed than if they donโ€™t
Having perspective
โ€ข Reporters
โ€ข It costs money to fix bugs, so each fix must justify the cost
โ€ข Key reason why bug bars / risk rating / exploitability index exist
โ€ข Come to terms with
โ€ข Your bug is unlikely to stop all development just to fix it
โ€ข The codebase may be old (internally) and devs working on latest & greatest
โ€ข Many things depend on the size of the company and resources available
Relevant: https://2017.zeronights.org/wp-content/uploads/materials/ZN17_AndreyLabunets_BootstrappingSecureByDesign.pdf
Mindset
โ€ข Think โ€˜vulnerable until proven otherwiseโ€™
โ€ข Instead of asking for proof thereโ€™s bugs or attack surface, assume yes
โ€ข Identify and poke each one to see if thereโ€™s merit
โ€ข Document & address if there are issues, else document why not vulnerable
โ€ข Reengineer systems or transition to new ones that make patching easier if
thatโ€™s a pain point
Mindset
โ€ข Map the notion of not doing security to a risky business
โ€ข Whatโ€™s going to save us if they break out of this isolation?
โ€ข Has this third party software been reviewed?
โ€ข Should this parser be in kernel land?
โ€œUnsandboxed ImageMagick is an unacceptable liability for any kind of businessโ€
Reference: https://www.imageflow.io / @micksmix0
Interacting with developers
โ€ข Itโ€™s not enough to point and say โ€˜this is brokenโ€™
โ€ข Each problem you describe should come paired with a solution
โ€ข Tons of benefits
โ€ข They trust you actually know what the problem is
โ€ข They treat you as a partner instead of just a critic (always be constructive)
โ€ข Enables reuse of the solutions in the future
โ€ข Automate the bug/class away
Relevant: https://lcamtuf.blogspot.com/2018/02/getting-product-security-engineering.html
Strategies
โ€ข Integrate into the dev process
โ€ข Insert people (or robots) into code repos and product checkpoints
โ€ข Make security easier for product team
โ€ข Automation and tooling
โ€ข Donโ€™t make security optional
โ€ข Code gating
โ€ข Secure-by-defaults
โ€ข Hold folks accountable
Relevant: https://lcamtuf.blogspot.com/2018/02/getting-product-security-engineering.html
Strategies
โ€ข De-value where possible
โ€ข Do we need to store any user data here?
โ€ข Why is access to this service so powerful?
โ€ข Could we not keep anything sensitive going between hosts in this network?
โ€ข Attackers donโ€™t spend time on worthless targets
โ€ข Increase cost, decrease value gained if compromised
Strategies
โ€ข Finish line
โ€ข Threat model correct? Y/N
โ€ข Triaged static analysis results? Y/N
โ€ข Tests? Y/N
โ€ข Pen-test? Y/N
โ€ข For each Y, attach proof
โ€ข For each N, you may not pass (without exception)
Being Effective
โ€ข Easy to say, but surprisingly more difficult to achieve
โ€ข Make mistakes non-repeatable where possible
โ€ข Automate tasks to make it easier for devs & secengs to find/fix bugs
โ€ข Thereโ€™s only so many security folks, so one must scale themselves
Being Effective
โ€ข More security and hardening generally means less bugs
โ€ข Less incidents, less pages, less randomizing patches
โ€ข Mix this thoroughly within your company culture
โ€ข Get data where possible
โ€ข Thereโ€™s a difference between doing stuff thatโ€™s fun vs measurably productive
โ€ข Focus on making them the same thing
Tooling & Automation
Static analysis
โ€ข Automate code reviews where you can
โ€ข A very finely tuned SA tool > team of code reviewers
โ€ข Spend your time writing or skimming more than reading
โ€ข Donโ€™t just run it one time
โ€ข Make it run every time
Static Analysis
โ€ข IDE plugins that mark bad code
โ€ข using an annotator or linting
โ€ข Input
โ€ข printf(line);
โ€ข Output
โ€ข printf(line);
Relevant:
https://www.cs.utah.edu/~tdenning/files/papers/baset-ide-plugins.pdf
https://www.slideshare.net/cypressdatadefense/continuous-integration-live-static-analysis-with-puma-scan
https://github.com/SublimeLinter/SublimeLinter-annotations
Static Analysis
โ€ข Many telemetry opportunities
โ€ข Capture these events for metrics on common hits, focus targeted training
around these for opportunities say share safer coding alternatives
โ€ข Input
โ€ข printf(line);
โ€ข Output
โ€ข printf(line);
Relevant:
https://www.cs.utah.edu/~tdenning/files/papers/baset-ide-plugins.pdf
https://www.slideshare.net/cypressdatadefense/continuous-integration-live-static-analysis-with-puma-scan
https://github.com/SublimeLinter/SublimeLinter-annotations
Static Analysis
โ€ข Banning dangerous functions via headers
โ€ข Throw errors during compile
โ€ข Eg. gcc poison and __attribute__ ((deprecated))
โ€ข Or parse build logs for warnings
โ€ข Start campaigns for stomping out ignored bugs
โ€ข โ€œTreat warnings as errorsโ€ approach where practical
Reference: https://leafsr.wordpress.com/2013/12/02/gcc-poison/
Static Analysis
โ€ข Gating code via infrastructure
โ€ข Client side commit hooks
โ€ข Server side scanning for undesirable coding practices
โ€ข Eg. credentials in source code is an easy catch
โ€ข Another telemetry opportunity
โ€ข Gather statistics on which patterns keep getting attempted
โ€ข Focus training and bug bashes accordingly
Reference: https://github.com/awslabs/git-secrets
Static Analysis
โ€ข Source/Binary Diffing
โ€ข How do you know the compiler is producing code as intended?
โ€ข Statements that are security-related could be optimized out
โ€ข Check if critical checks are missing in the release binary
โ€ข โ€œNever underestimate RE in your threat modelโ€
Relevant work: http://www.eng.utah.edu/~cs5785/slides-f10/Dangerous+Optimizations.pdf
Static Analysis
โ€ข Scanning code upon build
โ€ข Hook platforms into code repos
โ€ข Scan on-demand, every build or bug bash before a new release
Static Analysis
โ€ข Subscription of code changes
โ€ข Addition of interesting patterns
โ€ข Modification of critical files or components
โ€ข Notification via email, auto-added to CRs, Slack pings
โ€ข Also use the code index to gain additionally visibility into projects
Static Analysis
โ€ข Mitigating hardware attacks
โ€ข Insert redundancy, other anti-glitching strategies in critical code sections at
compile time or pre-commit
โ€ข Pros and cons with both transform points, still needs quick manual review
Static Analysis
โ€ข Variant finding
โ€ข Input: bad code
โ€ข Output: more bad code
โ€ข For PSIRT bugs, use reported bug data to find & fix any similar issues
โ€ข In the same product or other product lines
โ€ข Various algorithms to approach similarity searches
ProdSec: A Technical Approach
Static Analysis
โ€ข Machine learning
โ€ข If you have bug data, why not put it to work?
โ€ข Hope to talk about this one next time ;-)
Product DNA
โ€ข What components are native or imported from elsewhere
โ€ข Using OSS saves time / !re-inventing the wheel
โ€ข But also adds to your attack surface and requires maintenance
โ€ข You want to know..
โ€ข If youโ€™re running an old version
โ€ข If youโ€™re using an deprecated package
โ€ข If youโ€™re no longer relying on code thatโ€™s still accessible
ProdSec: A Technical Approach
Dynamic analysis
โ€ข Thereโ€™s nothing like running the code
โ€ข Understand how it actually works, validate/invalidate assumptions
โ€ข Eg. Sanitizers
โ€ข Free bugs from just opting-in and running the application
Reference: https://github.com/google/sanitizers
Dynamic analysis
โ€ข Re-use unit tests to create fuzzing tests
โ€ข Input: tests/* -> mutation engine
โ€ข Output: tests/security/*
โ€œFreeโ€ security tests!
ProdSec: A Technical Approach
Fuzzing Lab
โ€ข If youโ€™re not fuzzing your software, someone else will
โ€ข Much easier to find it โ€˜firstโ€™ and solve it in-house
โ€ข Generic platform with plugin-based fuzzer system
โ€ข Foundations first, then add specific capabilities
โ€ข AFL, Libfuzzer, custom mutators, etc
โ€ข Make it really ./ to fuzz
Relevant work: https://github.com/google/oss-fuzz
ProdSec: A Technical Approach
Dynamic Analysis
โ€ข Sub-system diffing
โ€ข What changes when the app is installed or service turned on?
โ€ข Are new DLLs being loaded?
โ€ข Network ports, pipes, registry, ACLs, etc
Related: https://packetstormsecurity.com/files/140055/Whale-Win32-Attack-Surface-Toolkit.html
Dynamic Analysis
โ€ข Auto-isolation
โ€ข Each new app is thoroughly exercised in an emulator
โ€ข Based upon behavior, sandbox config is generated
โ€ข App is restricted to necessary calls and โ€˜known goodโ€™
โ€ข Rinse and repeat for each application
โ€ข Can also use this for offense
โ€ข Capture in more detail what the app is doing and poke assumptions
Campaigns
Attack Surface Reduction
โ€ข Target product lines that ship large codebases
โ€ข Do we need to ship every native API?
โ€ข Do we need to include all these applications by default?
โ€ข Should we remove unused or deprecated components?
โ€ข If we turn this off in the config file, does anything fail?
โ€ข Also use code coverage data to drive removals
โ€ข More code == more attack surface == more bugs
Automating Information
โ€ข Donโ€™t spend time repeating yourself
โ€ข Build a knowledge base
โ€ข Add reusable content and solutions
โ€ข Keep it as a running wiki for everyone to update
Bug Bashes
โ€ข Getting devs + security team together for a day or evening
โ€ข Code review/fuzz attack surfaces
โ€ข Shake out bugs quickly
Door Knocking
โ€ข Continuously scanning the network for misconfigurations
โ€ข Default passwords, weak or no auth, open shares
โ€ข FTP, Telnet, Network shares, Web, etc
โ€ข Notify server owners with guidance on how to improve
โ€ข Document and follow-up
Hardening APIs
โ€ข Make APIs safer to use by default
โ€ข ParseStruct() -> HardenedParseStruct()
โ€ข Just wraps API to do some extra checks before passing it on
โ€ข Code thatโ€™s prone to bugs requires explicit exception or override
โ€ข Look for any projects using non-Hardened versions and switch them out
Relevant project: http://www.gwtproject.org/doc/latest/DevGuideSecuritySafeHtml.html
Pen-testing
โ€ข Have a process and stick to it
โ€ข Try to be frictionless with the intake
โ€ข Test the code thatโ€™s shipping, not the previous version
โ€ข Use surveys post-test for feedback and continuous improvement
โ€ข Vend it out when you need to
โ€ข But build up internal capabilities for deeper dives
Red Teaming
โ€ข Blackbox approach for pen-testing
โ€ข Trading coverage for simulating real world attacks
โ€ข Different perspectives can make external attack surface more clear
โ€ข โ€œHeat checksโ€ can be healthy
โ€ข Prioritize and donโ€™t be destructive
โ€ข But not on Fridays J
Training
โ€ข Expensive, butโ€ฆ
โ€ข The less you know, the more mistakes youโ€™ll make
โ€ข Can sprinkle this into roadmaps, explicitly or implicitly
Wide-net hunting
โ€ข Using a index to search for particular bug patterns across code bases
โ€ข Patterns can come from externally reported bugs (re-using free data) or
generically what certain bug classes look like
Mentoring
โ€ข Work on the next generation
โ€ข Fundamentals first
โ€ข Then how to be effective
โ€ข Develop a specialization
โ€ข So many distractions out there, focus and be productive
Conclusion
Culture
โ€ข Do stuff that matters
โ€ข Just because itโ€™s cool doesnโ€™t mean it will be effective
โ€ข Have an open mind
โ€ข Maybe the way weโ€™ve been doing it isnโ€™t the best way to do it
โ€ข Do the little things
โ€ข Thereโ€™s many thankless, little to zero visibility tasks that make a big difference
Culture
โ€ข Externally reported bugs are randomizing by nature
โ€ข Get what data you can out of them and use it
โ€ข Not productive to โ€˜wish awayโ€™ bugs
โ€ข There really is no โ€˜not our bugsโ€™ explanation
โ€ข Adding external, third party code to your platform can extend attack surface
โ€ข It doesnโ€™t not make your platform any less vulnerable
โ€ข Evaluate and set expectations with vendors before you buy, or donโ€™t
Relevant: http://addxorrol.blogspot.com/2015/12/a-decisionmakers-guide-to-buying.html
Culture
โ€ข Train folks to make the best decisions overall
โ€ข The ecosystem includes many different companies, researchers and
consumers
โ€ข Sometimes it takes time to steer the ship, so think big
โ€ข Cross-company > cross-org > intra-team
โ€ข Constructive criticism is healthy
โ€ข Itโ€™s ok to make mistakes, but be teachable and accept feedback
โ€ข Do post-mortems to ensure the same thing doesnโ€™t happen twice
In Closing
โ€ข We discussed many tools and techniques to help you ship less bugs
โ€ข Balancing security with shipping a product will have tradeoffs
โ€ข Document stuff even if you canโ€™t work on it today
โ€ข Prioritize and conquer
โ€ข Work on what you think is valuable
โ€ข problem:solution > problem
EOF
Questions?
jeremybatnvidia.com

More Related Content

What's hot (17)

PDF
Stakeholder management
Serbian Product Community
ย 
PPTX
BCM Institute MTE Jeremy Wong - Business Continuty Management Benchmarking i...
BCM Institute
ย 
PDF
Building A Social Media Plan
CanadaHelps / MyCharityConnects
ย 
DOC
Roles and-responsibilities-project manager
obsession56
ย 
PPTX
Agile transformation by Gnanasambandham anbazhagan
Gnanasambandham Anbazhagan CSP, CSM, CSPO
ย 
PPTX
Monitoring and evaluation of Projects
Litunya Laurean
ย 
PDF
Ngo project management
ahmed hassan
ย 
PPTX
Project Communications Management - PMBOK6
Agus Suhanto
ย 
PPTX
Digital transformation journey Consulting
Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW
ย 
PDF
Digital transformation Impact - COVID- 19
AIDA Digital UK
ย 
PDF
How to Write a Content Marketing Plan Step-by-Step
Buffer
ย 
PPTX
Customer Success Operations Summit
Gainsight
ย 
PPTX
Project communication management
Takudzwa Chatora
ย 
PDF
Uber Social Media Strategy
Domenica Suri
ย 
PDF
What is program evaluation lecture 100207 [compatibility mode]
Jennifer Morrow
ย 
PPTX
Project Stakeholder Management - PMBOK6
Agus Suhanto
ย 
PPTX
Stakeholder management
Alastair Cruickshank
ย 
Stakeholder management
Serbian Product Community
ย 
BCM Institute MTE Jeremy Wong - Business Continuty Management Benchmarking i...
BCM Institute
ย 
Building A Social Media Plan
CanadaHelps / MyCharityConnects
ย 
Roles and-responsibilities-project manager
obsession56
ย 
Agile transformation by Gnanasambandham anbazhagan
Gnanasambandham Anbazhagan CSP, CSM, CSPO
ย 
Monitoring and evaluation of Projects
Litunya Laurean
ย 
Ngo project management
ahmed hassan
ย 
Project Communications Management - PMBOK6
Agus Suhanto
ย 
Digital transformation journey Consulting
Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW
ย 
Digital transformation Impact - COVID- 19
AIDA Digital UK
ย 
How to Write a Content Marketing Plan Step-by-Step
Buffer
ย 
Customer Success Operations Summit
Gainsight
ย 
Project communication management
Takudzwa Chatora
ย 
Uber Social Media Strategy
Domenica Suri
ย 
What is program evaluation lecture 100207 [compatibility mode]
Jennifer Morrow
ย 
Project Stakeholder Management - PMBOK6
Agus Suhanto
ย 
Stakeholder management
Alastair Cruickshank
ย 

Similar to ProdSec: A Technical Approach (20)

PDF
AppSec in an Agile World
David Lindner
ย 
PPT
Software Security in the Real World
Mark Curphey
ย 
ODP
Making security-agile matt-tesauro
Matt Tesauro
ย 
PDF
Security Checkpoints in Agile SDLC
Rahul Raghavan
ย 
PPTX
Security within Scaled Agile
Mark Underwood
ย 
PPTX
Hacker vs Tools: Which to Choose?
Security Innovation
ย 
PPTX
Hacker vs tools
Geoffrey Vaughan
ย 
PDF
AppSec How-To: Achieving Security in DevOps
Checkmarx
ย 
PDF
Including security in devops
Jรฉrรฉmy Matos
ย 
PPTX
Ethical Hacking Conference 2015- Building Secure Products -a perspective
Dr. Anish Cheriyan (PhD)
ย 
PDF
Top 5 best practice for delivering secure in-vehicle software
Rogue Wave Software
ย 
PPT
Intro to-ssdl--lone-star-php-2013
nanderoo
ย 
PDF
Agile Secure Development
Bosnia Agile
ย 
PPT
Software Security Engineering
Marco Morana
ย 
PPTX
Digital Product Security
SoftServe
ย 
PDF
An Introduction to Secure Application Development
Christopher Frenz
ย 
ODP
Building an Open Source AppSec Pipeline
Matt Tesauro
ย 
ODP
Building an Open Source AppSec Pipeline - 2015 Texas Linux Fest
Matt Tesauro
ย 
PPTX
BUSTED! How to Find Security Bugs Fast!
Parasoft
ย 
PDF
The Most Important Thing: How Mozilla Does Security and What You Can Steal
mozilla.presentations
ย 
AppSec in an Agile World
David Lindner
ย 
Software Security in the Real World
Mark Curphey
ย 
Making security-agile matt-tesauro
Matt Tesauro
ย 
Security Checkpoints in Agile SDLC
Rahul Raghavan
ย 
Security within Scaled Agile
Mark Underwood
ย 
Hacker vs Tools: Which to Choose?
Security Innovation
ย 
Hacker vs tools
Geoffrey Vaughan
ย 
AppSec How-To: Achieving Security in DevOps
Checkmarx
ย 
Including security in devops
Jรฉrรฉmy Matos
ย 
Ethical Hacking Conference 2015- Building Secure Products -a perspective
Dr. Anish Cheriyan (PhD)
ย 
Top 5 best practice for delivering secure in-vehicle software
Rogue Wave Software
ย 
Intro to-ssdl--lone-star-php-2013
nanderoo
ย 
Agile Secure Development
Bosnia Agile
ย 
Software Security Engineering
Marco Morana
ย 
Digital Product Security
SoftServe
ย 
An Introduction to Secure Application Development
Christopher Frenz
ย 
Building an Open Source AppSec Pipeline
Matt Tesauro
ย 
Building an Open Source AppSec Pipeline - 2015 Texas Linux Fest
Matt Tesauro
ย 
BUSTED! How to Find Security Bugs Fast!
Parasoft
ย 
The Most Important Thing: How Mozilla Does Security and What You Can Steal
mozilla.presentations
ย 
Ad

More from Jeremy Brown (10)

PDF
Provoking Windows
Jeremy Brown
ย 
PPTX
Summer of Fuzz: macOS
Jeremy Brown
ย 
PPTX
Unsecuring SSH
Jeremy Brown
ย 
PPTX
Attacking Big Data Land
Jeremy Brown
ย 
PPTX
Adventures with Podman and Varlink
Jeremy Brown
ย 
PDF
Microsoft Vulnerability Research - How to be a finder as a vendor
Jeremy Brown
ย 
PPTX
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Jeremy Brown
ย 
PPTX
Hacking Virtual Appliances
Jeremy Brown
ย 
PPTX
Cloud Device Insecurity
Jeremy Brown
ย 
PPTX
A Bug Hunter's Perspective on Unix Drivers
Jeremy Brown
ย 
Provoking Windows
Jeremy Brown
ย 
Summer of Fuzz: macOS
Jeremy Brown
ย 
Unsecuring SSH
Jeremy Brown
ย 
Attacking Big Data Land
Jeremy Brown
ย 
Adventures with Podman and Varlink
Jeremy Brown
ย 
Microsoft Vulnerability Research - How to be a finder as a vendor
Jeremy Brown
ย 
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Jeremy Brown
ย 
Hacking Virtual Appliances
Jeremy Brown
ย 
Cloud Device Insecurity
Jeremy Brown
ย 
A Bug Hunter's Perspective on Unix Drivers
Jeremy Brown
ย 
Ad

Recently uploaded (20)

PDF
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
ย 
PDF
Troubleshooting Virtual Threads in Java!
Tier1 app
ย 
PPTX
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
ย 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
ย 
PPTX
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
ย 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
ย 
PDF
AI Image Enhancer: Revolutionizing Visual Qualityโ€
docmasoom
ย 
PDF
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
ย 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romรฉn Rodrรญguez-Gil
ย 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
ย 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
ย 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
ย 
PDF
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
ย 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
PDF
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
ย 
PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
ย 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
ย 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
ย 
PPTX
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
ย 
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
ย 
Troubleshooting Virtual Threads in Java!
Tier1 app
ย 
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
ย 
Explanation about Structures in C language.pptx
Veeral Rathod
ย 
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
ย 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
ย 
AI Image Enhancer: Revolutionizing Visual Qualityโ€
docmasoom
ย 
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
ย 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romรฉn Rodrรญguez-Gil
ย 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
ย 
Protecting the Digital World Cyber Securit
dnthakkar16
ย 
Activate_Methodology_Summary presentatio
annapureddyn
ย 
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
ย 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
ย 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
ย 
Generating Union types w/ Static Analysis
K. Matthew Dupree
ย 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
ย 
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
ย 

ProdSec: A Technical Approach

  • 2. Bio โ€ข Been around for a while in the industry โ€ข Bug hunter โ€ข Hardening products and systems โ€ข Tools and teams that make stuff ./ โ€ข Security Lead @ NVIDIA โ€ข All things ProdSec, breaking/fixing and providing solutions โ€ข Previously Microsoft (windows), Amazon (cloud) and independent consulting
  • 3. Agenda I. Intro II. Fundamentals III. Tooling & Automation IV. Campaigns V. Conclusion
  • 5. NVIDIA is more than just a gaming company now
  • 6. Fundamentals โ€ข Security is managing risk โ€ข Identify โ€ข Approach โ€ข Mitigate โ€ข R&D to understand and mitigate future risks โ€ข Defense is trained by offense
  • 7. * Server-only perspective, still tons of caveats
  • 8. Foundations โ€ข Vertical โ€ข Security persons or teams in each product group โ€ข Horizontal โ€ข Central team that collaborates across product groups โ€ข Hybrid โ€ข Most companies with significant security presence fit somewhere in here
  • 9. Roles โ€ข Security devs โ€ข Build security features or tooling, automate to scale โ€ข Security engs โ€ข Work with product team(s) or company-wide initiatives on reducing risk โ€ข SecOps โ€ข Often handle IT security, incidents, network hardening, holistic pen-testing
  • 10. Roles โ€ข Pen-testers โ€ข Focus on internal and external testing, even red teaming and service security โ€ข Exploiters / Researchers โ€ข Pushing bugs to maximum potential, assessing blast radius, determining risk โ€ข PSIRT โ€ข Managing mostly externally reported bugs, product team fixes, public comms All have various shades, levels and specialties in between
  • 11. What are we trying to do โ€ข Ship less bugs โ€ข Avoid the avoidable โ€ข Limit the blast radius โ€ข Make attacking more difficult in the first place โ€ข If compromise occurs, harden platform / network to mitigate advancement โ€ข Maintain balance โ€ข Security in lieu of usability/perf generally doesnโ€™t ship (or sell) Relevant: https://cansecwest.com/slides/2015/Project%20Zero%20-%20making%200day%20hard%20-%20Ben%20Hawkes.pdf
  • 12. Org tools at your disposal โ€ข Culture / Policy โ€ข โ€œWe should do itโ€ or โ€œAccording to the SDLโ€ โ€ข Alignment โ€ข โ€œX says we need to do thisโ€ โ€ข Escalation โ€ข โ€œYour people talk to my peopleโ€ Of course, always be nice J
  • 13. Models โ€ข Training โ€ข Teach them how to fish, but risk losing sight of the rewards long term โ€ข Hands-on โ€ข Work with them every step of the way, but this is hard to scale โ€ข On-boarding process, partnering, general visibility into org โ€ข Opt-in only โ€ข Must use these libraries and check these boxes, but requires culture Hybrid models are common
  • 14. MVSB โ€ข Minimally Viable Security Bar โ€ข The basics a dev team has to do without risking their ship getting blocked โ€ข Eg. design review, static analysis scan, pen-test โ€ข Negotiable, yet dedicated % of product roadmap for security activities โ€ข Allows security to be a requirement instead of โ€˜nice to have, but no timeโ€™
  • 15. Bug Hunting โ€ข Evaluating assumptions in the productโ€™s design and implementation โ€ข No one should ever send a large buffer, no need to check length before copy โ€ข Local users are trusted anyways, we donโ€™t need to protect data on filesystem โ€ข Only registered accounts can upload files and we shouldnโ€™t restrict them โ€ข Users know they cannot insert scripts here, nothing to worry about โ€ข We trust clients not to upload bad data, we donโ€™t need to check it beforehand โ€ข We want users to be able to run whatever they want, weโ€™ll block the bad stuff โ€ข The client should validate data before parsing it, thatโ€™s not the serverโ€™s job โ€ข The service is just open to internal users, so authentication is unnecessary โ€ข [โ€ฆ.]
  • 16. Security inside โ€ข Access to source code โ€ข Whitebox all the things โ€ข Reuse data for longer term initiatives to improve code quality โ€ข Coordinated new releases with product team Bugs are filed and queued for fix.
  • 17. Security outside โ€ข Only access to OSS, not closed products โ€ข But as they say, if you can read assemblyโ€ฆ โ€ข One bug may affect many different products or only certain versions โ€ข Often negotiated disclosure All bugs are special!
  • 18. Having perspective When someone tells you your code has bugs, you can either respond 1) โ€œWhy are they picking on us!?โ€ or 2) โ€œI wish we were more prepared, but this is good data to use and improve[โ€ฆ]โ€œ Which one is more productive? J
  • 19. Having perspective โ€ข Vendors โ€ข Once you release the code, package or service, itโ€™s out there โ€ข Assume anything someone can do with it, they will โ€ข Come to terms with โ€ข You wrote the code, therefore you also wrote the buggy code โ€ข Someone writing an exploit is just exercising the bug that was already there โ€ข Better for you if they report it and itโ€™s fixed than if they donโ€™t
  • 20. Having perspective โ€ข Reporters โ€ข It costs money to fix bugs, so each fix must justify the cost โ€ข Key reason why bug bars / risk rating / exploitability index exist โ€ข Come to terms with โ€ข Your bug is unlikely to stop all development just to fix it โ€ข The codebase may be old (internally) and devs working on latest & greatest โ€ข Many things depend on the size of the company and resources available Relevant: https://2017.zeronights.org/wp-content/uploads/materials/ZN17_AndreyLabunets_BootstrappingSecureByDesign.pdf
  • 21. Mindset โ€ข Think โ€˜vulnerable until proven otherwiseโ€™ โ€ข Instead of asking for proof thereโ€™s bugs or attack surface, assume yes โ€ข Identify and poke each one to see if thereโ€™s merit โ€ข Document & address if there are issues, else document why not vulnerable โ€ข Reengineer systems or transition to new ones that make patching easier if thatโ€™s a pain point
  • 22. Mindset โ€ข Map the notion of not doing security to a risky business โ€ข Whatโ€™s going to save us if they break out of this isolation? โ€ข Has this third party software been reviewed? โ€ข Should this parser be in kernel land? โ€œUnsandboxed ImageMagick is an unacceptable liability for any kind of businessโ€ Reference: https://www.imageflow.io / @micksmix0
  • 23. Interacting with developers โ€ข Itโ€™s not enough to point and say โ€˜this is brokenโ€™ โ€ข Each problem you describe should come paired with a solution โ€ข Tons of benefits โ€ข They trust you actually know what the problem is โ€ข They treat you as a partner instead of just a critic (always be constructive) โ€ข Enables reuse of the solutions in the future โ€ข Automate the bug/class away Relevant: https://lcamtuf.blogspot.com/2018/02/getting-product-security-engineering.html
  • 24. Strategies โ€ข Integrate into the dev process โ€ข Insert people (or robots) into code repos and product checkpoints โ€ข Make security easier for product team โ€ข Automation and tooling โ€ข Donโ€™t make security optional โ€ข Code gating โ€ข Secure-by-defaults โ€ข Hold folks accountable Relevant: https://lcamtuf.blogspot.com/2018/02/getting-product-security-engineering.html
  • 25. Strategies โ€ข De-value where possible โ€ข Do we need to store any user data here? โ€ข Why is access to this service so powerful? โ€ข Could we not keep anything sensitive going between hosts in this network? โ€ข Attackers donโ€™t spend time on worthless targets โ€ข Increase cost, decrease value gained if compromised
  • 26. Strategies โ€ข Finish line โ€ข Threat model correct? Y/N โ€ข Triaged static analysis results? Y/N โ€ข Tests? Y/N โ€ข Pen-test? Y/N โ€ข For each Y, attach proof โ€ข For each N, you may not pass (without exception)
  • 27. Being Effective โ€ข Easy to say, but surprisingly more difficult to achieve โ€ข Make mistakes non-repeatable where possible โ€ข Automate tasks to make it easier for devs & secengs to find/fix bugs โ€ข Thereโ€™s only so many security folks, so one must scale themselves
  • 28. Being Effective โ€ข More security and hardening generally means less bugs โ€ข Less incidents, less pages, less randomizing patches โ€ข Mix this thoroughly within your company culture โ€ข Get data where possible โ€ข Thereโ€™s a difference between doing stuff thatโ€™s fun vs measurably productive โ€ข Focus on making them the same thing
  • 30. Static analysis โ€ข Automate code reviews where you can โ€ข A very finely tuned SA tool > team of code reviewers โ€ข Spend your time writing or skimming more than reading โ€ข Donโ€™t just run it one time โ€ข Make it run every time
  • 31. Static Analysis โ€ข IDE plugins that mark bad code โ€ข using an annotator or linting โ€ข Input โ€ข printf(line); โ€ข Output โ€ข printf(line); Relevant: https://www.cs.utah.edu/~tdenning/files/papers/baset-ide-plugins.pdf https://www.slideshare.net/cypressdatadefense/continuous-integration-live-static-analysis-with-puma-scan https://github.com/SublimeLinter/SublimeLinter-annotations
  • 32. Static Analysis โ€ข Many telemetry opportunities โ€ข Capture these events for metrics on common hits, focus targeted training around these for opportunities say share safer coding alternatives โ€ข Input โ€ข printf(line); โ€ข Output โ€ข printf(line); Relevant: https://www.cs.utah.edu/~tdenning/files/papers/baset-ide-plugins.pdf https://www.slideshare.net/cypressdatadefense/continuous-integration-live-static-analysis-with-puma-scan https://github.com/SublimeLinter/SublimeLinter-annotations
  • 33. Static Analysis โ€ข Banning dangerous functions via headers โ€ข Throw errors during compile โ€ข Eg. gcc poison and __attribute__ ((deprecated)) โ€ข Or parse build logs for warnings โ€ข Start campaigns for stomping out ignored bugs โ€ข โ€œTreat warnings as errorsโ€ approach where practical Reference: https://leafsr.wordpress.com/2013/12/02/gcc-poison/
  • 34. Static Analysis โ€ข Gating code via infrastructure โ€ข Client side commit hooks โ€ข Server side scanning for undesirable coding practices โ€ข Eg. credentials in source code is an easy catch โ€ข Another telemetry opportunity โ€ข Gather statistics on which patterns keep getting attempted โ€ข Focus training and bug bashes accordingly Reference: https://github.com/awslabs/git-secrets
  • 35. Static Analysis โ€ข Source/Binary Diffing โ€ข How do you know the compiler is producing code as intended? โ€ข Statements that are security-related could be optimized out โ€ข Check if critical checks are missing in the release binary โ€ข โ€œNever underestimate RE in your threat modelโ€ Relevant work: http://www.eng.utah.edu/~cs5785/slides-f10/Dangerous+Optimizations.pdf
  • 36. Static Analysis โ€ข Scanning code upon build โ€ข Hook platforms into code repos โ€ข Scan on-demand, every build or bug bash before a new release
  • 37. Static Analysis โ€ข Subscription of code changes โ€ข Addition of interesting patterns โ€ข Modification of critical files or components โ€ข Notification via email, auto-added to CRs, Slack pings โ€ข Also use the code index to gain additionally visibility into projects
  • 38. Static Analysis โ€ข Mitigating hardware attacks โ€ข Insert redundancy, other anti-glitching strategies in critical code sections at compile time or pre-commit โ€ข Pros and cons with both transform points, still needs quick manual review
  • 39. Static Analysis โ€ข Variant finding โ€ข Input: bad code โ€ข Output: more bad code โ€ข For PSIRT bugs, use reported bug data to find & fix any similar issues โ€ข In the same product or other product lines โ€ข Various algorithms to approach similarity searches
  • 41. Static Analysis โ€ข Machine learning โ€ข If you have bug data, why not put it to work? โ€ข Hope to talk about this one next time ;-)
  • 42. Product DNA โ€ข What components are native or imported from elsewhere โ€ข Using OSS saves time / !re-inventing the wheel โ€ข But also adds to your attack surface and requires maintenance โ€ข You want to know.. โ€ข If youโ€™re running an old version โ€ข If youโ€™re using an deprecated package โ€ข If youโ€™re no longer relying on code thatโ€™s still accessible
  • 44. Dynamic analysis โ€ข Thereโ€™s nothing like running the code โ€ข Understand how it actually works, validate/invalidate assumptions โ€ข Eg. Sanitizers โ€ข Free bugs from just opting-in and running the application Reference: https://github.com/google/sanitizers
  • 45. Dynamic analysis โ€ข Re-use unit tests to create fuzzing tests โ€ข Input: tests/* -> mutation engine โ€ข Output: tests/security/* โ€œFreeโ€ security tests!
  • 47. Fuzzing Lab โ€ข If youโ€™re not fuzzing your software, someone else will โ€ข Much easier to find it โ€˜firstโ€™ and solve it in-house โ€ข Generic platform with plugin-based fuzzer system โ€ข Foundations first, then add specific capabilities โ€ข AFL, Libfuzzer, custom mutators, etc โ€ข Make it really ./ to fuzz Relevant work: https://github.com/google/oss-fuzz
  • 49. Dynamic Analysis โ€ข Sub-system diffing โ€ข What changes when the app is installed or service turned on? โ€ข Are new DLLs being loaded? โ€ข Network ports, pipes, registry, ACLs, etc Related: https://packetstormsecurity.com/files/140055/Whale-Win32-Attack-Surface-Toolkit.html
  • 50. Dynamic Analysis โ€ข Auto-isolation โ€ข Each new app is thoroughly exercised in an emulator โ€ข Based upon behavior, sandbox config is generated โ€ข App is restricted to necessary calls and โ€˜known goodโ€™ โ€ข Rinse and repeat for each application โ€ข Can also use this for offense โ€ข Capture in more detail what the app is doing and poke assumptions
  • 52. Attack Surface Reduction โ€ข Target product lines that ship large codebases โ€ข Do we need to ship every native API? โ€ข Do we need to include all these applications by default? โ€ข Should we remove unused or deprecated components? โ€ข If we turn this off in the config file, does anything fail? โ€ข Also use code coverage data to drive removals โ€ข More code == more attack surface == more bugs
  • 53. Automating Information โ€ข Donโ€™t spend time repeating yourself โ€ข Build a knowledge base โ€ข Add reusable content and solutions โ€ข Keep it as a running wiki for everyone to update
  • 54. Bug Bashes โ€ข Getting devs + security team together for a day or evening โ€ข Code review/fuzz attack surfaces โ€ข Shake out bugs quickly
  • 55. Door Knocking โ€ข Continuously scanning the network for misconfigurations โ€ข Default passwords, weak or no auth, open shares โ€ข FTP, Telnet, Network shares, Web, etc โ€ข Notify server owners with guidance on how to improve โ€ข Document and follow-up
  • 56. Hardening APIs โ€ข Make APIs safer to use by default โ€ข ParseStruct() -> HardenedParseStruct() โ€ข Just wraps API to do some extra checks before passing it on โ€ข Code thatโ€™s prone to bugs requires explicit exception or override โ€ข Look for any projects using non-Hardened versions and switch them out Relevant project: http://www.gwtproject.org/doc/latest/DevGuideSecuritySafeHtml.html
  • 57. Pen-testing โ€ข Have a process and stick to it โ€ข Try to be frictionless with the intake โ€ข Test the code thatโ€™s shipping, not the previous version โ€ข Use surveys post-test for feedback and continuous improvement โ€ข Vend it out when you need to โ€ข But build up internal capabilities for deeper dives
  • 58. Red Teaming โ€ข Blackbox approach for pen-testing โ€ข Trading coverage for simulating real world attacks โ€ข Different perspectives can make external attack surface more clear โ€ข โ€œHeat checksโ€ can be healthy โ€ข Prioritize and donโ€™t be destructive โ€ข But not on Fridays J
  • 59. Training โ€ข Expensive, butโ€ฆ โ€ข The less you know, the more mistakes youโ€™ll make โ€ข Can sprinkle this into roadmaps, explicitly or implicitly
  • 60. Wide-net hunting โ€ข Using a index to search for particular bug patterns across code bases โ€ข Patterns can come from externally reported bugs (re-using free data) or generically what certain bug classes look like
  • 61. Mentoring โ€ข Work on the next generation โ€ข Fundamentals first โ€ข Then how to be effective โ€ข Develop a specialization โ€ข So many distractions out there, focus and be productive
  • 63. Culture โ€ข Do stuff that matters โ€ข Just because itโ€™s cool doesnโ€™t mean it will be effective โ€ข Have an open mind โ€ข Maybe the way weโ€™ve been doing it isnโ€™t the best way to do it โ€ข Do the little things โ€ข Thereโ€™s many thankless, little to zero visibility tasks that make a big difference
  • 64. Culture โ€ข Externally reported bugs are randomizing by nature โ€ข Get what data you can out of them and use it โ€ข Not productive to โ€˜wish awayโ€™ bugs โ€ข There really is no โ€˜not our bugsโ€™ explanation โ€ข Adding external, third party code to your platform can extend attack surface โ€ข It doesnโ€™t not make your platform any less vulnerable โ€ข Evaluate and set expectations with vendors before you buy, or donโ€™t Relevant: http://addxorrol.blogspot.com/2015/12/a-decisionmakers-guide-to-buying.html
  • 65. Culture โ€ข Train folks to make the best decisions overall โ€ข The ecosystem includes many different companies, researchers and consumers โ€ข Sometimes it takes time to steer the ship, so think big โ€ข Cross-company > cross-org > intra-team โ€ข Constructive criticism is healthy โ€ข Itโ€™s ok to make mistakes, but be teachable and accept feedback โ€ข Do post-mortems to ensure the same thing doesnโ€™t happen twice
  • 66. In Closing โ€ข We discussed many tools and techniques to help you ship less bugs โ€ข Balancing security with shipping a product will have tradeoffs โ€ข Document stuff even if you canโ€™t work on it today โ€ข Prioritize and conquer โ€ข Work on what you think is valuable โ€ข problem:solution > problem