Software Security - SEGI - I
Software Security - SEGI - I
Software Security - SEGI - I
Agenda
Conclusion: Security concerns fluctuate significantly, being more major in the design.
(Ideally).
Why security for applications?
Security as an add-on
Very bad and worst practice
Iron Triangle Constraints
Threat Model for Software
Threat Model for Software
1. Customers should be able to search for products and place their orders using the
web store or by calling the sales office.
2. Prior to a customer’s placing an order, a customer account needs to be created.
3. Customer must pay with a credit card or debit card.
4. Customers must be logged in before they are allowed to personalize their
preferences.
5. Customers should be able to write reviews of only the products they purchase.
6. Sales agents are allowed to give discounts to customers.
7. Administrators can modify and delete customer and product information.
Threat Model for Software
Threat Model for Software
Diagram Application Architecture
Physical topology
Threat Model for Software
Diagram Application Architecture
Logical topology
Threat Model for Software
Diagram Application Architecture
Components, services, protocols, and ports
Threat Model for Software
Diagram Application Architecture
Identities that will be used in the application
Threat Model for Software
Diagram Application Architecture
Human and non-human actors of the system
Threat Model for Software
Diagram Application Architecture
Risk management
Diagram Architecture Application
Identify threats
Risk management
Damage Potential (D)
1 = Nothing
2 = Individual user data is compromised or DREAD
affected
(Damage Potential, Reproducibility,
3 = Complete system or data destruction
Exploitability, Affected Users, and
Reproducibility (R) Discoverability)
1 = Very hard or impossible, even for
administrators of the
application Affected Users (A)
2 = One or two steps required; may need to 1 = None
be an authorized user 2 = Some users or systems, but not all
3 = Just the address bar in a web browser is 3 = All users
sufficient, without Authentication
Discoverability (DI)
Exploitability (E) 1 = Very hard-to-impossible; requires source
1 = Advanced programming and networking code or administrative
knowledge, with access
custom or advanced attack tools 2 = Can figure it out by guessing or by
2 = Malware exists on the Internet, or an monitoring network traces
exploit is easily performed 3 = Information is visible in the web
using available attack tools browser address bar or in a
3 = Just a web browser form
Risk management
Identify threats
Risk management
The company must decide which will be the risk treatment option for
each identified risk, considering acceptable risk, costs and losses
If the company decides to mitigate the risk, it means that the security
requirement must be implemented
OWASP TOP10
OWASP TOP 10
• OWASP products:
Security tools
Documents, standards, books, https://www.owasp.org
Local chapters
Conferences
Mailing lists
• One of the most popular products: OWASP TOP 10
https://storage.googleapis.com/google-code-archive-
downloads/v2/code.google.com/owasptop10/OWASP%20Top%2010%20-%202013.pdf
WebGoat
https://www.owasp.org/index.php/Category:OWASP_WebGoat_Project
ZAP
https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project
OWASP TOP 10
OS COMMAND INJECTION
• Same problem: a command sequence is built using user input which is
NOT sanitized or validated
• Imagine what would happen if the OS application account is not restricted
http://www.mycompany.com/sensitive/cgi-bin/userData.pl?doc=%20%3B%20/bin/ls%20-l
https://www.owasp.org/index.php/Command_Injection
Injection Laboratory
INJECTION
This is a normal
request
INJECTION
Here I am injecting
the command
INJECTION
Execution on live!
https://www.youtube.com/watch?v=M2wU
CSIeeqY&list=PL9HjVcGKtXM305JN2FjKyHN
AGIZxZNzNn&index=1
Assignment
• In groups of two persons chose a vulnerability from the
Owasp Top 10 and deliver:
I. A presentation that contains:
• 1 slide that contains the name of the vulnerability
• 1 slide explaining How the attack occur (Threat Agent and Attack vector),
Why (Security Weakness) and the Impact (Technical Impact, Business
Impact). Follow the template of the first slide of Injection vulnerability.
• 1 slide explaining the section “Is the application vulnerable?” or “Am I
vulnerable to …”
• 1 slide explaining the section “How do I prevent …?” or “How to prevent”
• 1 slide explaining the section “Example attack Scenarios”
II. Understand and explain an attack (Not done by you)
• You can play one video of our Youtube channel, from another channel or
use another resource you consider useful:
– https://www.youtube.com/playlist?list=PL9HjVcGKtXM305JN2FjKyHNAGIZxZ
NzNn
– https://www.youtube.com/playlist?list=PL9HjVcGKtXM2pi1nY2g6SWM9yiyet
EB5A
Note: Presentation (Writing and oral) must be done in English and
should last 10 minutes approx
OWASP TOP 10
Bibliography
Main resources:
https://www.owasp.org/index.php/Top_10-2017_Top_10
https://www.owasp.org/index.php/Top_10_2013-Top_10
Multimedia resources:
https://www.youtube.com/playlist?list=PL9HjVcGKtXM305JN2FjKyHNAGIZxZ
NzNn
https://www.youtube.com/playlist?list=PL9HjVcGKtXM2pi1nY2g6SWM9yiye
tEB5A
OWASP TOP 10