<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ threat modeling - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ threat modeling - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 20 Sep 2026 21:10:28 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/threat-modeling/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ What Can Money Heist Teach Us About Cybersecurity? ]]>
                </title>
                <description>
                    <![CDATA[ By Periklis Gkolias I was watching the TV series, La Casa De Papel (Money Heist), on Netflix a few weeks ago. I realized that the story of the gang can reveal some best practices we should use while dealing with the security of the products we build.... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/cybersecurity-lessons-from-money-heist-show/</link>
                <guid isPermaLink="false">66d4608c733861e3a22a734f</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ threat modeling ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 07 Feb 2022 14:49:47 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/02/money-heist-image.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Periklis Gkolias</p>
<p>I was watching the TV series, La Casa De Papel (Money Heist), on Netflix a few weeks ago. I realized that the story of the gang can reveal some best practices we should use while dealing with the security of the products we build.</p>
<p>Beware – this text contains spoilers. If you haven't watched the show until the end and you are planning to, please visit the article on a later day. Or proceed at your own risk :)</p>
<h2 id="heading-threat-modeling-can-protect-you-against-unexpected-events">Threat modeling can protect you against unexpected events</h2>
<p>First of all, <strong>what is threat modeling</strong>?</p>
<p>Threat modeling, in layperson's terms, is an analytical process. In it, the engineers who build a product coordinate with the security team. They collaborate towards the security architecture of the product.</p>
<p>More specifically, it's the model – how someone can attack the product – and what is worth protecting (assets). They also model what they can be less concerned about. Less concerned not because they don't care. But because protecting it can be more costly than the asset itself.</p>
<p>Threat modeling can get you a long way and protect you from certain events, against the odds. </p>
<p>What is threat modeling in our "Money Heist" case? It is Professor's (aka Sergio Marquina's) plan against all potential routes the plan will take. In having alternatives, even for the edgiest scenarios. The assets are clearly the stolen money or his comrades in the heist.</p>
<h2 id="heading-a-single-point-of-failure-can-cause-a-chain-of-bad-reactions">A single point of failure can cause a chain of bad reactions</h2>
<p>Threat modeling might help you recover from many security problems that will arise. You can recover from a cyber-attack, but things will never be the same. A crack in the security wall can have a domino effect.</p>
<p>Imagine a lake dam, with a few cracks around it going unnoticed and being exploited by nature. You can always fix it, but it might take time for the lake visitors to establish trust again. </p>
<p>In the same way, small companies that experience a security issue might close in the next few months, according to a <a target="_blank" href="https://cybersecurityventures.com/60-percent-of-small-companies-close-within-6-months-of-being-hacked/">survey</a>. </p>
<p>This is like the Professor, where he lost respect after the gold (temporarily) vanished. Even though his great problem-solving skills helped resolve the issue, things got hairy very fast.</p>
<p><img src="https://i.imgur.com/3047AXD.jpg" alt="Chain reactions" width="903" height="481" loading="lazy"></p>
<h2 id="heading-luck-is-not-a-strategy-in-the-long-term">Luck is not a strategy in the long term</h2>
<p>In the show, there are some provocative cases of luck. For example:</p>
<ul>
<li>Raquel renegading the police organization</li>
<li>Police and army failing plans to invade the bank</li>
<li>Failing to shoot to the target many times. Especially by troops that are supposed to be professional shooters.</li>
</ul>
<p>After all, in the <a target="_blank" href="https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X">pragmatic programmer</a> book, there is a whole chapter about how bad it is to program by coincidence. It likens luck-as-strategy with the soldier that moves without a plan in a field full of landmines.</p>
<p>Snitches and worse-than-expected defense might give you some extra time to move with your plan or escape. But you have to take advantage of it. To either move with your plan or escape. Always think your luck might go away, any time soon.</p>
<h2 id="heading-never-drop-the-weapons">Never drop the weapons</h2>
<p>This is not specific to cybersecurity but to life in general.</p>
<p>Pain is temporary, quitting lasts forever. Accept your mistakes, remediate them and learn from them. As long as your heart is pumping blood, you are not dead yet.</p>
<ul>
<li>Architectural mistake? Patch it immediately and re-architect the product (yeah, I know...delivery and business constraints)</li>
<li>Below expectations monitoring? Fix it now. Add more people and see how they can be more effective</li>
<li>Serious defects in the code? Train your team in secure practices and code reviews focused on security. Buy a license to a package like Snyk or Nessus. Plan some percentage of your capacity to patch the most severe ones</li>
</ul>
<p><img src="https://i.imgur.com/BtMM0JS.jpg" alt="Budget constraints" width="1125" height="1390" loading="lazy"></p>
<h2 id="heading-even-in-the-worst-of-moments-keep-your-composure">Even in the worst of moments, keep your composure</h2>
<p>Imagine a ransomware attack. It is there, it is happening. Screaming over people's heads will not solve the problem.</p>
<p>When you cannot win against an attack, you still have to do your best, to at least not lose. For sure, don't panic. As the Stoics say, you have to be your best self on the things you control. And let the rest just be. Accept them.</p>
<p>You cannot control the next stage of an attack. But you can do your best to prevent it, to not repeat the same mistakes, and to close the open doors that exist now.</p>
<p>That is true for non tech issues too. If a pipe broke at home what would you do? First, you stop the damage and maybe provide a sustainable fix (given the timeframe). Then you try to see how this will never happen again.</p>
<p>Don't lose your temper and clear mind, like Tamayo lost it, when he realized the gang was blackmailing him for various reasons.</p>
<p>He got angry, he got blackmailed, he was even ridiculed in the eyes of the European Central Bank. And what was the result? He lost, hands down, even though he lied to the media about winning.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Top-notch cybersecurity is not a free lunch. And not everyone can do it, as the caveats are so many. But with some discipline, retrospection, and humility, you can do wonders. Also, the show is great, if you haven't seen it, please do.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ If You Want to Build a Secure Treehouse (or Software Application), Start at the Bottom ]]>
                </title>
                <description>
                    <![CDATA[ If you’ve ever watched a kid draw a treehouse, you have some idea of how applications are built when security isn’t made a priority.  It’s far more fun to draw the tire swing, front porch, and swimming pool than to worry about how a ten-thousand-gall... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/if-you-want-to-build-a-treehouse-start-at-the-bottom/</link>
                <guid isPermaLink="false">66bd8f6127629f4c5e1893b4</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ development process  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ threat modeling ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Victoria Drake ]]>
                </dc:creator>
                <pubDate>Sun, 17 May 2020 20:52:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/cover.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you’ve ever watched a kid draw a treehouse, you have some idea of how applications are built when security isn’t made a priority. </p>
<p>It’s far more fun to draw the tire swing, front porch, and swimming pool than to worry about how a ten-thousand-gallon bucket of water stays suspended in midair. </p>
<p>With too much attention spent on fun and flashy features, foundations suffer.</p>
<p><img src="https://victoria.dev/blog/if-you-want-to-build-a-treehouse-start-at-the-bottom/for-the-turrets.png" alt="A comic I drew about building castles with poor foundations. It’s not that funny." width="600" height="400" loading="lazy">
<em>A comic I drew about building stable foundations. It's not that funny.</em></p>
<p>Of course, spending undue hours building a back end like Fort Knox may not be necessary for your application, either. Being an advocate for security doesn’t mean always wearing your tinfoil hat (although you do look dashing in it) but does mean building in an appropriate amount of security.</p>
<p>How much security is appropriate? The answer, frustratingly, is, “it depends.” The right amount of security for your application depends on who’s using it, what it does, and most importantly, what undesirable things it could be made to do. </p>
<p>It takes some analysis to make decisions about the kinds of risks your application faces and how you’ll prepare to handle them. Okay, now’s a good time to don your tinfoil hat. Let’s imagine the worst.</p>
<h2 id="heading-threat-modeling-whats-the-worst-that-could-happen">Threat modeling: what’s the worst that could happen?</h2>
<p>A <em>threat model</em> is a stuffy term for the result of trying to imagine the worst things that could happen to an application. Using your imagination to assess risks (fittingly called <em>risk assessment</em>) is a conveniently non-destructive method for finding ways an application can be attacked. </p>
<p>You won’t need any tools – just an understanding of how the application might work, and a little imagination. You’ll want to record your results with pen and paper. For the younger folks, that means the notes app on your phone.</p>
<p>A few different methodologies for application risk assessment can be found in the software world, including the in-depth <a target="_blank" href="https://csrc.nist.gov/publications/detail/sp/800-30/rev-1/final">NIST Special Publication 800-30</a>. Each method’s framework has specific steps and output, and will go into various levels of detail when it comes to defining threats. </p>
<p>If following a framework, first choose the one you’re most likely to complete. You can always add more depth and detail from there.</p>
<p>Even informal risk assessments are beneficial. Typically taking the form of a set of questions, they may be oriented around possible threats, the impact to assets, or ways a vulnerability could be exploited. </p>
<p>Here are some examples of questions addressing each orientation:</p>
<ul>
<li>What kind of adversary would want to break my app? What would they be after?</li>
<li>If the control of <em>x</em> fell into the wrong hands, what could an attacker do with it?</li>
<li>Where could <em>x</em> vulnerability occur in my app?</li>
</ul>
<p>A basic threat model explains the technical, business, and human considerations for each risk. It will typically detail:</p>
<ul>
<li>The vulnerabilities or components that can cause the risk</li>
<li>The impact that a successful execution of the risk would have on the application</li>
<li>The consequences for the application’s users or organization</li>
</ul>
<p>The result of a risk assessment exercise is your threat model. In other words, it's a list of things you would very much like not to occur. </p>
<p>It is usually sorted in a hierarchy of risks, from the worst to the mildest. The worst risks have the most negative impact, and are most important to protect against. The mildest risks are the most acceptable — while still an undesirable outcome, they have the least negative impact on the application and users.</p>
<p>You can use this resulting hierarchy as a guide to determine how much of your cybersecurity efforts to apply to each risk area. An appropriate amount of security for your application will eliminate (where possible) or mitigate the worst risks.</p>
<h2 id="heading-pushing-left">Pushing left</h2>
<p>Although it sounds like a dance move meme, <em>pushing left</em> refers instead to building in as much of your planned security as possible in the early stages of software development.</p>
<p>Building software is a lot like building a treehouse, just without the pleasant fresh air. You start with the basic supporting components, such as attaching a platform to a tree. Then comes the framing, walls, and roof, and finally, your rustic-modern Instagram-worthy wall hangings and deer bust.</p>
<p>The further along in the build process you are, the harder and more costly it becomes to make changes to a component that you’ve already installed. </p>
<p>If you discover a problem with the walls only after the roof is put in place, you may need to change or remove the roof in order to fix it. Similar parallels can be drawn for software components, only without similar ease in detangling the attached parts.</p>
<p>In the case of a treehouse, it’s rather impossible to start with decorations or even a roof, since you can’t really suspend them in midair. </p>
<p>In the case of software development, it is, unfortunately, possible to build many top-layer components and abstractions without a sufficient supporting architecture. </p>
<p>A push-left approach views each additional layer as adding cost and complication. Pushing left means attempting to mitigate security risks as much as possible at each development stage before proceeding to the next.</p>
<h2 id="heading-building-bottom-to-top">Building bottom-to-top</h2>
<p>By considering your threat model in the early stages of developing your application, you reduce the chances of necessitating a costly remodel later on. You can make choices about architecture, components, and code that support the main security goals of your particular application.</p>
<p>While it’s not possible to foresee all the functionality your application may one day need to support, it is possible to prepare a solid foundation that allows additional functionality to be added more securely. Building in appropriate security from the bottom to the top will help make mitigating security risks much easier in the future.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to analyze the security of your application with threat modeling ]]>
                </title>
                <description>
                    <![CDATA[ By Goran Aviani Digital attacks are more and more frequent, and the first step in securing your app is understanding the threats and how to counter them. Threat modeling is an approach that analyses the security of an application. It is a structured ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/threat-modeling-goran-aviani/</link>
                <guid isPermaLink="false">66d45ef98812486a37369cd1</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Stride ]]>
                    </category>
                
                    <category>
                        <![CDATA[ threat modeling ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 30 Jul 2019 11:09:14 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/07/image-44-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Goran Aviani</p>
<p>Digital attacks are more and more frequent, and the first step in securing your app is understanding the threats and how to counter them.</p>
<p>Threat modeling is an approach that analyses the security of an application. It is a structured way to identify, quantify and mitigate the security risks in an application.</p>
<p>You are about to read a short briefing I wrote for myself some time ago, made up from information I’ve collected by dissecting several other articles. The idea behind this article is for it to act as a reminder and to be as short as possible but still hold relevant information.</p>
<hr>
<p>So with that being said, let’s write the most common definition of threat modeling:</p>
<blockquote>
<p>Threat modeling is a security process with goals to identify objectives  and vulnerabilities and then define countermeasures to prevent or lessen  the effects of threats to the system.</p>
</blockquote>
<p>I’ve also read that threat modeling gives answers to these four questions:</p>
<ul>
<li><em>What are we working on?</em></li>
<li><em>What can go wrong?</em></li>
<li><em>What are we going to do about it?</em></li>
<li><em>Did we do a good job?</em></li>
</ul>
<p>And I couldn’t agree more. That’s why threat modeling is composed of four parts, where each part answers one question:</p>
<ul>
<li><em>Decomposing the application.</em></li>
<li><em>Determining the threats.</em></li>
<li><em>Determine counter measures and mitigations (reducing the danger).</em></li>
<li><em>Rank threats.</em></li>
</ul>
<h1 id="heading-decomposing-the-application">Decomposing the application</h1>
<p>The goal of this step is to understand the application by decomposing it into parts and seeing how those parts interact with external entities. The way to do this is to gather information and documentation by mapping the application’s entry points, elements/assets and dependencies.</p>
<ul>
<li>Decompose the application by drawing a diagram of various components in the  application. You can do this with Data Flow Diagrams.</li>
<li>Identifying  entry points — Software entry points may serve as entry points of an  attacker( login pages, search fields, HTTP requests etc.). It is essential that all entry points are identified and documented.</li>
<li>Identifying  the elements/assets — that have a value, and therefore a risk of being  attacked. An asset can be in a form of data like a list of customer  information, it can also be in different forms: overall application  availability, organizations reputation.</li>
<li>Dependencies  are parts of the app that lay outside of the application’s code. As  these items are outside of your control they may pose a threat if they are not properly maintained so identifying these dependencies will minimize the application’s overall risk.</li>
</ul>
<h1 id="heading-determining-threats">Determining threats</h1>
<p>Determining threats can be done by threat categorization STRIDE. STRIDE is an  approach from the attackers perspective, and it is used to determine  threats. While there are other approaches such as ASF (Application  security framework — an approach from the defenders perspective to  determine countermeasures), in this article I will be focusing on  STRIDE.</p>
<blockquote>
<p>STRIDE categorization outlines six most common types of threats and their countermeasures.</p>
</blockquote>
<h2 id="heading-stride">STRIDE</h2>
<ol>
<li><strong>S</strong>poofing identity — Impersonating someone or something else.</li>
<li><strong>T</strong>empering with data — Modifying some data on disk, network, memory.</li>
<li><strong>R</strong>eputation — Denial of proof of some action.</li>
<li><strong>I</strong>nformation disclosure — Exposing information to someone not authorized to see it.</li>
<li><strong>D</strong>enial of service — Deny or degrade service to users.</li>
<li><strong>E</strong>levation of privileges — Unauthorized gaining of more rights than originally intended.</li>
</ol>
<h1 id="heading-determining-countermeasures">Determining countermeasures</h1>
<p>Every threat from STRIDE has a countermeasure.</p>
<ol>
<li>Authentication (for Spoofing) — Establishing a verifiable identity.</li>
<li>Data protection (for Tempering with data) — Maintaining data and ensuring consistency of data and methods that work on data.</li>
<li>Confirmation (for Reputation) — Every action against the application must be logged.</li>
<li>Confidentiality ( for Information disclosure) — Restricting access to system and data.</li>
<li>Availability(for Dos) — Leverage levels of redundancies.</li>
<li>Authorization (for Elevation of privileges) — Limiting access to data, actions and services.</li>
</ol>
<h1 id="heading-rank-threats">Rank Threats</h1>
<p>To  tackle the problem of ranking threats Microsoft devised a risk  assessment model called DREAD, a model which provides five rating  categories for each threat. In the beginning they used the rating from 1  to 10, ex. for every threat in each category a rating from 1 do 10  would be given.</p>
<p>However,  as different people selected very different numbers, there was a shift  away from DREAD ratings within high number ranges towards some simpler  classification with 4 different levels of risk:</p>
<ul>
<li>1: low</li>
<li>2: medium</li>
<li>3: high</li>
<li>4: critical</li>
</ul>
<p>Sum of all ratings for a given threat is used to prioritize it among other threats.</p>
<p>The categories to rank for every threat are:</p>
<ul>
<li><strong>D</strong>amage — how bad would an attack be?</li>
<li><strong>R</strong>eproducibility — how easy is it to reproduce the attack?</li>
<li><strong>E</strong>xploitability — how much work is it to launch the attack?</li>
<li><strong>A</strong>ffected users — how many people will be impacted?</li>
<li><strong>D</strong>iscoverability — how easy is it to discover the threat?</li>
</ul>
<p>For  every threat in each category a rating from 1 do 4 is given and the sum  of all ratings for a given threat is used to prioritize it among other  threats.</p>
<hr>
<p>Up until now we decomposed the application, analysed functionalities,  determined possible risks and identified weak points that could be  exploited. Then we determined the countermeasures and used DREAD to rank  the risks. The only thing left is to act accordingly in solving those  risks.</p>
<hr>
<p>Thank you for reading! Check out more articles like this on my freeCodeCamp profile: <a target="_blank" href="https://www.freecodecamp.org/news/author/goran/">https://www.freecodecamp.org/news/author/goran/</a> and other fun stuff I build on my GitHub page: <a target="_blank" href="https://github.com/GoranAviani">https://github.com/GoranAviani</a></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
