Embracing an Adversarial Mindset for Cpp SecurityEmbracing an Adversarial Mindset for C++ Security Amanda Rousseau 9/18/2024 This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY1 cross-org issues to combat a whole bug class 15% ● Writing tools to help with discovery 4%Adversarial Mindset Not taught in traditional institutionsThinking Like an Adversary Challenging assumptions Creatively libraries: • clang_rt.fuzzer_no_main-x86_64.lib • libsancov.libImportance of a security-focused mindset Considering security from the start of a project Threat modeling at the design stage Know the0 码力 | 92 页 | 3.67 MB | 6 月前3
Back to Basics Unit Testingcomplicated... Choose the smallest amount of work that you can write a test for "Engineering" mindset "Hacking" mindset Courtesy of Phil Nash 82TDD is difficult... Takes dedicated practice Requires a new0 码力 | 109 页 | 4.13 MB | 6 月前3
Find Code Reviews Valuable: Try Pair Programming, You'll Love It!together Instant evaluation Grow furtherTransformation Resistance low with others Contagious Mindset Each others’ support Let’s try it out!Quality Ownership Knowledge Evolution Transformations0 码力 | 38 页 | 3.76 MB | 6 月前3
Tracy: A Profiler You Don't Want to Missalso affect compiler optimizations! 65 skewed profiling is still useful, but requires a different mindset Gotchas Beware excessive instrumentation!• just wait a little bit more (host application may not0 码力 | 84 页 | 8.70 MB | 6 月前3
Some Things C++ Does Right92Programming with a value-based language • In a reference-based language like C# or Java, the mindset is different • One gets indirect access by default for class instances • Objects are zeroed by0 码力 | 228 页 | 2.47 MB | 6 月前3
simd: How to Express Inherent Parallelism Efficiently Via Data-Parallel TypesModels Outlook Summary Abstract Conceptually: std::simd types express data-parallelism. Wrong mindset: std::simd types are specific SIMD registers. Which is why I prefer to call them “data-parallel0 码力 | 160 页 | 8.82 MB | 6 月前3
Back to Basics - Function Call Resolution Work outward to the scope of f. Look in the namespace scope(s). That is, look for nin the namespace scope(s) enclosing f. Start in the namespace immediately enclosing f. Work outward to the swap(name, other.name); swap(idnum, other.idnum); }; In other words, the compiler: searches outward for declarations for swapfrom the point of the call, and allows argument-dependent lookup (ADL)0 码力 | 44 页 | 1.30 MB | 6 月前3
Whats in a Name? Whats a Name in? - Walter E. Brown - CppCon 2020there’s no matching decl in N, unqualified name lookup won’t find the friend and keeps looking outward, finding the typedef. � (ADL would find the friend, but isn’t triggered because f doesn’t name0 码力 | 7 页 | 4.37 MB | 6 月前3
共 8 条
- 1













