{"id":11743,"date":"2026-02-24T17:33:48","date_gmt":"2026-02-24T16:33:48","guid":{"rendered":"https:\/\/republify.se\/?post_type=product&#038;p=11743"},"modified":"2026-02-24T17:46:46","modified_gmt":"2026-02-24T16:46:46","slug":"secure-coding-in-c-and-c-plus-plus","status":"publish","type":"product","link":"https:\/\/republify.se\/index.php\/produkt\/secure-coding-in-c-and-c-plus-plus\/","title":{"rendered":"Secure coding in C and C++"},"content":{"rendered":"<div class=\"detail-text\">\n<div class=\"detail-text\">\n<div class=\"detail-text\">\n<div class=\"detail-text\">\n<div class=\"detail-text\">\n<h2><strong>Day 1<\/strong><\/h2>\n<\/div>\n<div class=\"tab-content\">\n<div id=\"pills-0\" class=\"tab-pane active show\" role=\"tabpanel\" aria-labelledby=\"pills-0-tab\">\n<ul>\n<li>Cyber security basics\n<ul>\n<li>What is security?<\/li>\n<li>Threat and risk<\/li>\n<li>Cyber security threat types \u2013 the CIA triad<\/li>\n<li>Cyber security threat types \u2013 the STRIDE model<\/li>\n<li>Consequences of insecure software<\/li>\n<\/ul>\n<\/li>\n<li>Memory management vulnerabilities\n<ul>\n<li>Assembly basics and calling conventions\n<ul>\n<li>x64 assembly essentials<\/li>\n<li>Registers and addressing<\/li>\n<li>Most common instructions<\/li>\n<li>Calling conventions on x64\n<ul>\n<li>Calling convention \u2013 what it is all about<\/li>\n<li>Calling convention on x64<\/li>\n<li>The stack frame<\/li>\n<li>Stacked function calls<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Buffer overflow\n<ul>\n<li>Memory management and security<\/li>\n<li>Vulnerabilities in the real world<\/li>\n<li>Buffer security issues<\/li>\n<li>Buffer overflow on the stack\n<ul>\n<li>Buffer overflow on the stack \u2013 stack smashing<\/li>\n<li>Exploitation \u2013 Hijacking the control flow<\/li>\n<li>Lab \u2013 Buffer overflow 101, code reuse<\/li>\n<li>Exploitation \u2013 Arbitrary code execution<\/li>\n<li>Injecting shellcode<\/li>\n<li>Lab \u2013 Code injection, exploitation with shellcode<\/li>\n<li>Case study \u2013 Stack BOF in FriendlyName handling of the Wemo Smart Plug<\/li>\n<\/ul>\n<\/li>\n<li>Buffer overflow on the heap\n<ul>\n<li>Unsafe unlinking<\/li>\n<li>Case study \u2013 Heap BOF in WinRAR<\/li>\n<\/ul>\n<\/li>\n<li>Pointer manipulation\n<ul>\n<li>Modification of jump tables<\/li>\n<li>Overwriting function pointers<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Best practices and some typical mistakes\n<ul>\n<li>Unsafe functions<\/li>\n<li>Dealing with unsafe functions<\/li>\n<li>Lab \u2013 Fixing buffer overflow<\/li>\n<li>Using std::string in C++<\/li>\n<li>Unterminated strings<\/li>\n<li>Manipulating C-style strings in C++<\/li>\n<li>Malicious string termination<\/li>\n<li>Lab \u2013 String termination confusion<\/li>\n<li>String length calculation mistakes<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<h2><strong>Day 2<\/strong><\/h2>\n<div class=\"tab-content\">\n<div id=\"pills-1\" class=\"tab-pane active show\" role=\"tabpanel\" aria-labelledby=\"pills-1-tab\">\n<ul>\n<li>Memory management hardening\n<ul>\n<li>Securing the toolchain\n<ul>\n<li>Securing the toolchain in C and C++<\/li>\n<li>AddressSanitizer (ASan)\n<ul>\n<li>Using AddressSanitizer (ASan)<\/li>\n<li>Lab \u2013 Using AddressSanitizer<\/li>\n<\/ul>\n<\/li>\n<li>Stack smashing protection\n<ul>\n<li>Detecting BoF with a stack canary<\/li>\n<li>Argument cloning<\/li>\n<li>Stack smashing protection on various platforms<\/li>\n<li>SSP changes to the prologue and epilogue<\/li>\n<li>Lab \u2013 Effects of stack smashing protection<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Runtime protections\n<ul>\n<li>Runtime instrumentation<\/li>\n<li>Address Space Layout Randomization (ASLR)\n<ul>\n<li>ASLR on various platforms<\/li>\n<li>Lab \u2013 Effects of ASLR<\/li>\n<li>Circumventing ASLR \u2013 NOP sleds<\/li>\n<\/ul>\n<\/li>\n<li>Non-executable memory areas\n<ul>\n<li>The NX bit<\/li>\n<li>Write XOR Execute (W^X)<\/li>\n<li>NX on various platforms<\/li>\n<li>Lab \u2013 Effects of NX<\/li>\n<li>NX circumvention \u2013 Code reuse attacks\n<ul>\n<li>Return-to-libc \/ arc injection<\/li>\n<\/ul>\n<\/li>\n<li>Return Oriented Programming (ROP)\n<ul>\n<li>Protection against ROP<\/li>\n<li>Case study \u2013 Systematic exploitation of a MediaTek buffer overflow<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Common software security weaknesses\n<ul>\n<li>Security features\n<ul>\n<li>Authentication<\/li>\n<li>Password management\n<ul>\n<li>Inbound password management\n<ul>\n<li>Storing account passwords<\/li>\n<li>Password in transit<\/li>\n<li>Lab \u2013 Is just hashing passwords enough?<\/li>\n<li>Dictionary attacks and brute forcing<\/li>\n<li>Salting<\/li>\n<li>Adaptive hash functions for password storage<\/li>\n<li>Password policy\n<ul>\n<li>NIST authenticator requirements for memorized secrets<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Outbound password management\n<ul>\n<li>Hard coded passwords<\/li>\n<li>Best practices<\/li>\n<li>Lab \u2013 Hardcoded password<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Code quality\n<ul>\n<li>Code quality and security<\/li>\n<li>Data handling\n<ul>\n<li>Type mismatch<\/li>\n<li>Lab \u2013 Type mismatch<\/li>\n<li>Initialization and cleanup\n<ul>\n<li>Constructors and destructors<\/li>\n<li>Initialization of static objects<\/li>\n<li>Lab \u2013 Initialization cycles<\/li>\n<li>Array disposal in C++<\/li>\n<li>Lab \u2013 Mixing delete and delete[]<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Memory and pointers\n<ul>\n<li>Memory and pointer issues<\/li>\n<li>Pointer handling pitfalls<\/li>\n<li>Null pointers\n<ul>\n<li>NULL dereference<\/li>\n<li>NULL dereference in pointer-to-member operators<\/li>\n<\/ul>\n<\/li>\n<li>Pointer usage in C and C++\n<ul>\n<li>Use after free<\/li>\n<li>Lab \u2013 Use after free<\/li>\n<li>Lab \u2013 Runtime instrumentation<\/li>\n<li>Double free<\/li>\n<li>Case study \u2013 UAF and double free in netfilter<\/li>\n<li>Smart pointers<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><strong>Day 3<\/strong><\/h2>\n<\/div>\n<ul>\n<li>Common software security weaknesses\n<ul>\n<li>Input validation\n<ul>\n<li>Input validation principles<\/li>\n<li>Denylists and allowlists<\/li>\n<li>What to validate \u2013 the attack surface<\/li>\n<li>Where to validate \u2013 defense in depth<\/li>\n<li>When to validate \u2013 validation vs transformations<\/li>\n<li>Validation with regex<\/li>\n<li>Regular expression denial of service (ReDoS)<\/li>\n<li>Lab \u2013 ReDoS<\/li>\n<li>Dealing with ReDoS<\/li>\n<li>Injection\n<ul>\n<li>Code injection\n<ul>\n<li>OS command injection\n<ul>\n<li>Lab \u2013 Command injection<\/li>\n<li>OS command injection best practices<\/li>\n<li>Avoiding command injection with the right APIs<\/li>\n<li>Lab \u2013 Command injection best practices<\/li>\n<li>Case study \u2013 Shellshock<\/li>\n<li>Lab \u2013 Shellshock<\/li>\n<li>Case study \u2013 Command injection in Zyxel IKE packet decoder<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Process control\n<ul>\n<li>Library injection<\/li>\n<li>Lab \u2013 Library hijacking<\/li>\n<li>Library injection best practices<\/li>\n<\/ul>\n<\/li>\n<li>Integer handling problems\n<ul>\n<li>Representing signed numbers<\/li>\n<li>Integer visualization<\/li>\n<li>Integer promotion<\/li>\n<li>Integer overflow<\/li>\n<li>Lab \u2013 Integer overflow<\/li>\n<li>Signed \/ unsigned confusion<\/li>\n<li>Case study \u2013 Signed\/unsigned confusion DoS in DrayTek Vigor routers<\/li>\n<li>Lab \u2013 Signed \/ unsigned confusion<\/li>\n<li>Integer truncation<\/li>\n<li>Lab \u2013 Integer truncation<\/li>\n<li>Case study \u2013 WannaCry<\/li>\n<li>Best practices\n<ul>\n<li>Upcasting<\/li>\n<li>Precondition testing<\/li>\n<li>Postcondition testing<\/li>\n<li>Best practices in C++<\/li>\n<li>Lab \u2013 Integer handling best practices in C++<\/li>\n<li>Case study \u2013 Integer check failure in Skia<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Files and streams\n<ul>\n<li>Path traversal<\/li>\n<li>Lab \u2013 Path traversal<\/li>\n<li>Path traversal best practices<\/li>\n<li>Lab \u2013 Path canonicalization<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Wrap up\n<ul>\n<li>Secure coding principles\n<ul>\n<li>Principles of robust programming by Matt Bishop<\/li>\n<li>Secure design principles of Saltzer and Schroeder<\/li>\n<\/ul>\n<\/li>\n<li>And now what?\n<ul>\n<li>Software security sources and further reading<\/li>\n<li>C and C++ resources<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"detail-text\">\n<div class=\"detail-text\">\n<h3>Kursen levereras i samarbete med<\/h3>\n<p><img decoding=\"async\" class=\"alignnone size-medium wp-image-1202 lazyload\" data-src=\"https:\/\/republify.se\/wp-content\/uploads\/2022\/02\/cydrill_logo-300x83.jpg\" alt=\"\" width=\"300\" height=\"83\" data-srcset=\"https:\/\/republify.se\/wp-content\/uploads\/2022\/02\/cydrill_logo-300x83.jpg 300w, https:\/\/republify.se\/wp-content\/uploads\/2022\/02\/cydrill_logo.jpg 427w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/83;\" \/><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p><strong>Your application written in C and C++ works as intended, so you are done, right? But did you consider feeding in incorrect values? 16Gbs of data? A null? An apostrophe? Negative numbers, or specifically -1 or -2^<sup>31<\/sup>? Because that&#8217;s what the bad guys will do \u2013 and the list is far from complete.<\/strong><\/p>\n<p>Handling security needs a healthy level of paranoia, and this is what this course provides: a strong emotional engagement by lots of hands-on labs and stories from real life, all to substantially improve code hygiene. Mistakes, consequences, and best practices are our blood, sweat and tears.<\/p>\n<p><strong>All this is put in the context of C and C++, and extended by core programming issues, discussing security pitfalls of these languages.<\/strong><\/p>\n<p><em>So that you are prepared for the forces of the dark side.\u00a0So that nothing unexpected happens.\u00a0Nothing.<\/em><\/p>\n","protected":false},"featured_media":11746,"comment_status":"open","ping_status":"closed","template":"","meta":{"wds_primary_product_brand":0,"wds_primary_product_cat":0},"product_brand":[],"product_cat":[77,57,31],"product_tag":[],"class_list":{"0":"post-11743","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-c-technical","7":"product_cat-secure-coding","8":"product_cat-security","10":"first","11":"instock","12":"taxable","13":"shipping-taxable","14":"purchasable","15":"product-type-simple"},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/product\/11743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/comments?post=11743"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/media\/11746"}],"wp:attachment":[{"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/media?parent=11743"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/product_brand?post=11743"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/product_cat?post=11743"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/republify.se\/index.php\/wp-json\/wp\/v2\/product_tag?post=11743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}