From Penetrate and Patch to Building Security In
Michael Hicks
Professor of Computer Science and the UofM Institute for Advanced Computer Studies (UMIACS) Distinguished Scholar-Teacher talk September 28, 2015
From Penetrate and Patch to Building Security In Michael Hicks - - PowerPoint PPT Presentation
From Penetrate and Patch to Building Security In Michael Hicks Professor of Computer Science and the UofM Institute for Advanced Computer Studies (UMIACS) Distinguished Scholar-Teacher talk September 28, 2015 Security breaches Just a few:
Michael Hicks
Professor of Computer Science and the UofM Institute for Advanced Computer Studies (UMIACS) Distinguished Scholar-Teacher talk September 28, 2015
https://www.oneid.com/7-biggest-security-breaches-of-the-past-decade-2/
Just a few: *containing SSNs, credit card nums, other private info
2B LOC 50M LOC … …
exploiting a vulnerability
design flaw that can be exploited to effect an undesired behavior
http://www.nytimes.com/ 2010/09/26/world/middleeast/ 26iran.html
Stuxnet specifically targets … processes such as those used to control … centrifuges for separating nuclear
zero-day flaws, Stuxnet functions by targeting machines using the Microsoft Windows
then seeking out Siemens Step7 software.
http://www.wired.com/2015/07/ hackers-remotely-kill-jeep- highway/
The result of their work was a hacking technique —what the security industry calls a zero-day exploit—that can target Jeep Cherokees and give the attacker wireless control, via the Internet, to any of thousands of vehicles.
problem from way back?
figures out how to work around them
bugs, to save money
Key difference:
An attacker is not a normal user!
using unusual interactions and features
much worse, to achieve his goals
Popular technologies such as firewalls, anti- virus, and intrusion detection/prevention, attempt to detect the attacks themselves. But new attacks can be produced that avoid detection but exploit the same vulnerabilities
detection signature) But: Still vulnerable to undiscovered bugs … and new bugs introduced by software upgrades
http://www.zdnet.com/article/ fireeye-kaspersky-hit-with-zero- day-flaw-claims/
Security researcher Tavis Ormandy disclosed the existence of a vulnerability which impacts on Kaspersky [security] products. Hermansen, [another researcher,] publicly disclosed a zero-day vulnerability within cyberforensics firm FireEye's security product, complete with proof-of-concept code.
and bugs in security products themselves!
The long-term solution is to prevent all exploitable bugs before deploying Avoid the holes to start with!
build a bridge that stands up despite harsh conditions?
weather
problem. Develop the best
from Day 1!
problem. Develop the best
from Day 1!
lessons (i.e., from past bridges built and past failures)
results
everything will be OK (you can just patch problems later)
Same idea: Security from Day 1
Why not done already?
languages and testing tools
language
instructions that tell a computer what to do
instructions to achieve a particular task
within the computer’s memory when executed by the processor
Data and Instructions
Processor (CPU) Memory (RAM)
multiplications
Set R to 1 Set C to Y Is C ≤ 0 ? If so, skip to the end Set R to X · R Set C to C - 1 If C > 0 repeat the above two instructions
X = Y = C = R = 3 2
Instructions Data
2
Set R to 1 Set C to Y Is C ≤ 0 ? If so, skip to the end Set R to X · R Set C to C - 1 If C > 0 repeat the above two instructions
X = Y = C = R = 3 2 1
Instructions Data
2
Set R to 1 Set C to Y Is C ≤ 0 ? If so, skip to the end Set R to X · R Set C to C - 1 If C > 0 repeat the above two instructions
X = Y = C = R = 3 2 1 3 1
Instructions Data
2
Set R to 1 Set C to Y Is C ≤ 0 ? If so, skip to the end Set R to X · R Set C to C - 1 If C > 0 repeat the above two instructions
X = Y = C = R = 3 2 1 3 1 9
Instructions Data
Done
exp: movl $1, %eax testl %esi, %esi jle .L3 .L6: imull %edi, %eax subl $1, %esi jne .L6 .L3: machine instructions %edi = contains base value X %esi = contains exponent Y and counter C %eax = contains result R Set R to 1 Set C to Y Is C ≤ 0 ? If so, skip to the end Set R to X · R Set C to C - 1 If C > 0 repeat the above two instructions
hard for humans to understand and maintain!
instructions to be executed by the processor
http://spectrum.ieee.org/static/interactive-the-top-programming-languages
int exp(int x, int y) { int r = 1; while (y > 0) { r = r * x; y = y - 1; } return r; }
In Java it would look much the same, but that’s not true in general
def exp(x, y): r = 1 while y > 0: r = r * x y = y - 1 return r
let rec exp x y = if y = 0 then 1 else x * exp x (y-1)
exp(X,0,1) :- !. exp(X,Y,R) :- Y1 is Y-1, exp(X,Y1,R1), R is X * R1.
int exp(int x, int y) { int r = 1; while (y ≥ 0) { r = r * x; y = y - 1; } return r; }
should be “greater than” not “greater than or equal to”
any incorrect behavior serves the attacker
time, with technical names like
programs written in C and C++
the program to do much worse
Data Instructions
X =
abc123
Password? abc123 Failed
Instructions
X =
Overflow!!!!! 3.log in
Data
Password?
Overflow!!!!! 3.log in
Access granted
getting the application to treat attacker-provided data as instructions (code)
ensure this never happens
ensure buffer sizes are respected
Instructions
X =
Overflow!!
Data
Password?
Overflow!!!!! 3.log in
Program halted
whenever you can, and use C and C++ when you must
efficiency and control of C but the safety of modern languages
collaboration with researchers at Cornell, Harvard, Washington, and AT&T Labs Research
ccured
How do we know if Cyclone meets its goals?
programs are secure
programs
1.6x Cyclone 8.5x Java Translated the C programs to Cyclone; changed only 5-15% of the program
Low effort More effort
features (and far better than typical modern languages)
Cyclone addresses several of the reasons people use inadequate methods:
from legacy code to something safer, while addressing technical and non-technical concerns
(and that of related efforts) is on modern language and system design.
the memory management features from Cyclone
Microsoft Research
https://software.intel.com/en-us/blogs/2013/07/22/intel-memory- protection-extensions-intel-mpx-support-in-the-gnu-toolchain
https://www.rust-lang.org/
Build it
in a way that prevents security defects
vulnerabilities and exploit them
Break it
Problem: Too much emphasis on breaking, not building
vulnerabilities and exploit them
Break it
DEFCON CTF, Collegiate Cyber defense challenge (CCDC), Pwn to Own, …
A new kind of security contest: rewards breaking and building
(BIBIFI)
many other teams found the same bug)
Build-it Score Break-it Score
the same bug, thus reducing the penalty for those test cases
has a broader agenda too
when you develop, or when you hunt for bugs
Show what works!
1st prize: Team JavaTheHut
1st prize: Team Black_Horse 2nd prize: Team Tosca
Build-it Break-it Fix-It Judging Time → Build-it Score → Teams that implemented their program in C or C++ scored worse, on average, than other teams
not using it correlated with scoring well
Recall the reasons people use inadequate methods, once again:
evidence for what works
considering how programming languages (PL) can improve the quality of software
about the great work being done in programming languages
disciplinary connections, more
180,000 page views (most popular post received 30K views).
http://www.pl-enthusiast.net/
http://www.pl-enthusiast.net/2015/06/02/the-pl- enthusiast-turns-one/
teaching an on-line course on software security
this presentation
with 93,332 learners enrolled, and 3,034 who have completed the course.
the Coursera “Capstone” project using the BIBIFI contest
previously vulnerable to attack are finally becoming more secure
better technology and getting the word out about building software to be more secure
result in repeating the mistakes of the past
There is more work to do!
…
post-docs,
and mentors,
bridges
from day 1