Secure Programming =
making sure software does what is expected to do and nothing else.
It cannot be misused in any ways.
Mindset of Secure Programming:
Following best practices and thinking defensively
Task of Software Engineer:
mainly implementation of business requirements but:
- respect security requirements
- Implement designs and policies in Software
- apply security concepts in every step of development cycle
Security flaws may be introduced in which step of the SDLC?
any step of the SDLC
Apple goto fail
geschweifte Klammern fehlen, weshalb zweites goto
if statement fragt ab ob es Fehler gab, wenn Fehler war != 0, da in return err zurückgegeben wird, sieht es aus wie successful verified.
Heartbleed (2014) led to
Memory leakage
Heartbleed (2014) Vulnerability
Idea of heartbeat –> check if server is still alive
Client: “Hi server, please say MESSAGE (length of MESSAGE)
Server: “MESSAGE”
Cloudbleed let to…
Memory Leakage
Cloudbleed Vulnerabilty
Checking end of HTML buffer before copy to output stream –> broken HTML tags caused vulnerable websites to leaking information of other unrelated sites:
- HTTP headers
- Body of HTTP POST (incl. Passwords)
- JSON requests and responses of API calls
- URI parameters
- Cookies and authentication data (such as API keys and OAuth tokens)
- …
Was Cloudbleed vulnerability fixed soon?
Yes, but the problem was Search engines cached some of the leaked content
Linux Kernel Backdoor (2003)
current uid wird gesetzt durch = und nicht verglichen –> root
British Airways Case
22 lines of JavaScript were injected into British Airways website –> Information was sent to server controlled by attackers without disrupting the flow trhough TLS to host baways.com
How to react to a reported security vulnerability:
Risk =
Impact x Probability
Risk in Software Development =
Impact x Threat Level x Vulnerability Level
Threat Level =
Exposure, capabilities of an attacker like skills, resources incentive
Vulnerability Level =
presence and general security of flaw
Goal of Secure Programming:
Reducing Vulnerability Level by:
- reducing number of vulnerabilities in the system
- making it hard to exploit them
Attack surface =
sum of different attack vectors where unauthorized users can try to enter data to or extract data from an environment
Through an attack surface an adversary can:
Microsoft Vulnerability Mitigation Strategy
Security in Software Development Process is needed in…
every step
Automatisierung ist im ganzen Prozess wichtig, da es…
die Geschwindigkeit erhöht.