SlideShare a Scribd company logo
Software Security
From school to
reality and back!
#outline
* terminology
* hacker-hats
* From school
* tools
* competitions
* progress
* references
Programing ?
* Program :
Transformation of question /
task to math-logic problem
* Code :
Smart calculator based on
sequences of reads and
writes
* Performance
how smart you build logic of
your calculator
hacker
http://en.wikipedia.org/wiki/Hacker
Hacker (term), is a term used in computing
that can describe several types of persons
1. Hacker (computer security) someone who
seeks and exploits weaknesses in a computer
system or computer network
2. Hacker (hobbyist), who makes innovative
customizations or combinations of retail
electronic and computer equipment
3. Hacker (programmer subculture), who
combines excellence, playfulness, cleverness
and exploration in performed activities
vulnerability
http://en.wikipedia.org/wiki/Vulnerability_(computing)
In computer security, a vulnerability is a
weakness which allows an attacker to reduce a
system's information assurance. Vulnerability
is the intersection of three elements: a
system susceptibility or flaw, attacker access
to the flaw, and attacker capability to
exploit the flaw.[1] To exploit a
vulnerability, an attacker must have at least
one applicable tool or technique that can
connect to a system weakness. In this frame,
vulnerability is also known as the attack
surface
exploitation
http://en.wikipedia.org/wiki/Exploit_(computer_security)
An exploit (from the English verb to exploit,
meaning "using something to one’s own
advantage") is a piece of software, a chunk of
data, or a sequence of commands that takes
advantage of a bug or vulnerability in order
to cause *UNINTENDED OR UNANTICIPATED
BEHAVIOR* to occur on computer software,
hardware, or something electronic (usually
computerized). Such behavior frequently
includes things like gaining control of a
computer system, allowing privilege
escalation, or a denial-of-service attack.
Exploitation [??? guys]
▪ Hunt vulnerabilities
– Write fuzzers, checkers, support tools …
– Use 0days for their own reasons, cyber weapons,
spying..
▪ Invent / copy methodologies
– Misuse hole in protection mechanism for attack!
– Do 0day business with 3rd party
– Keep their research private
What ??? do
Exploitation [good guys]
▪ Hunt vulnerabilities
– Write fuzzers, checkers, support tools …
– Report to vendors & Cooperate on fix
▪ Invent new methodologies
– To uncover weakness of current protection
mechanism
– Cooperate on effective mitigations
– Share research with community for faster
improvement
What good guys do
CALC …
Seriously ?!
Attack chain
• Social
engineering
• Vulnerability
Attack vector :
• Killing 0days
proactive
solution!
Prevent to automatic
install malware
• Cure after-
effects
Dissecting malware
If proactive fails
Targeted attack here won already!
Aftermath
Low hanging fruits
Poping calcs
Good luck …
... It is all about bugs ...
▪ We are humans and making mistakes
▪ Many bugs in code, especially in large codebase
▪ OS introduce many defensive mechanism for effective
mitigating techniques for exploiting bugs
▪ What every programmer should know
– Algorithms
– Designs problems & principles
– CPU & Memory (& at least basic understanding of your compiler)
– vulnerability classes
– mitigation techniques
– auditing tools
Algorithms [RP, Tvorba efekt. algo.]
▪ Most of times you will not re-implement binary trees,
fibonaci heaps, flow algo …
▪ But Algorithmic thinking helps you to find a way how to
effective solve given problems
▪ It learns you out-of-box thinking
▪ BUT, Can also push you to the corners!
▪ Always keep in mind : PERFORMANCE > SECURITY is very
*very* bad idea
▪ First think about design, later optimize!
https://www.topcoder.com/community/data-science/data-science-tutorials/
Design [Programovanie (3)]
▪ OOP is very effective way to build complex systems
▪ Reuse code, modularity, abstraction
▪ Keep clean code, descriptive naming, simple one purpose
functions
▪ Keep focus on language features, and its newest development!
▪ Design patterns can help /show you generalization of problem
▪ But design patterns are *not* solution for everything
▪ Think about design patterns and use them when it is
appropriate
▪ Good design leads to easier maintance, refactoring & review
https://sourcemaking.com/design_patterns http://www.stroustrup.com/C++11FAQ.htm
MEMORY & CPU [Principy pocitacov]
▪ Understand memory & cpu
– How are data stored
– Instructions – assembler
▪ X86, arm
▪ Understand “program->compiler->assembly”
– Variables
– Functions
– Loops & calls
https://www.recurse.com/blog/5-learning-c-with-gdb https://www.recurse.com/blog/7-understanding-c-by-learning
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
SAT Solvers [FOJA, Algebra]
▪ Magic Blackbox with right answer
– Boolean Satisfiability Problem
▪ Based on Boolean algebra
▪ NP-complete , but some optimalization used 
▪ Appropriate & smart formulation of problem (part of
problem), helps in fuzzers and explotation as well
▪ Competition of sat solvers!
http://www.quarkslab.com/dl/StHack2015-Dynamic-Behavior-
Analysis-using-Binary-Instrumentation-Jonathan-Salwan.pdf
https://github.com/0vercl0k/z3-
playground/blob/master/hackingweek-reverse400_z3.py
http://en.wikipedia.org/wiki/Boolean_satisfiability_problem http://www.satcompetition.org/
bugs & bugs
http://www.sublimetext.com/ http://en.wikipedia.org/wiki/Buffer_overflow
CODE :
Bubble sort ?
http://www.vim.org/ https://inguma.eu/projects/bokken
VULNERABILITY
Bubble sort !
As signed numbers can represent
NEGATIVE numbers, they lose a
range of positive numbers that
can only be represented with
unsigned numbers of the same
size (in bits) because roughly
half the possible values are
non-positive values (so if an 8-
bit is signed, positive unsigned
values 128 to 255 are gone while
-128 to 127 are present).
Unsigned variables can dedicate
all the possible values to the
positive number range.https://www.visualstudio.com/
en-us/products/visual-studio-
community-vs.aspx
EXPLOITATION
Bubble sort !
Some of hardening
Stack
canaries
Memory
allocation
randomiza
tion
Memory
object
separation
DEP
i want exec Those are
data
How to Start
… tools, competitions …
IDE (+ plugins!)
programming environment
• Visual Studio 2013
(community edition)
• Vim
• Sublime
REVERSE ENGENEERING
• bokken
• windbg
• gdb (lldb)
Virtual machine + emulators
• Virtual Box
• Bochsd
• Qemu
Additional tools (win)
• ConEmu (far manager)
• Hiew
• cygwin
Additional tools
• Z3
• Capstone
• Git
• Process explorer
ALGO - COMPETITIONS
CTF - COMPETITIONS
Final words
… advices, references …
SELF –
learning
For ever and ever
best approach
*DO
SPORT*
Keep balanced
body and mind
essential for
creative ideas ;)
HARDwork
Push 110% to
everything in your
life (learning, sport,
work, study, …)
#whoami
* Peter Hlavaty -
@zer0mem
* GJH (2004-2008)
* Matfyz (2008-2010)
* ESET (2010-2014)
* KEEN (2014-…)
* Conferences (…)
* Lectures (…)
* Pwn Events (...)
Feel free to ContacT me
I will try to help
(with some delay +- :)
tweets
▪ @aionescu
▪ @Ivanlef0u
▪ @K33nTeam
▪ @binitamshah
▪ @taviso
▪ @team509
▪ @mdowd
▪ @d_olex
▪ @grsecurity
▪ @kernelpool
▪ @gynvael
▪ @j00ru
▪ @lcamtuf
▪ @0verl0ck
▪ @matrosov
▪ @vxradius
▪ @trimosx
▪ @solardiz
References - tools
editor:
http://www.vim.org/
https://www.visualstudio.com/en-us/
products/visual-studio-community-vs.aspx
http://www.sublimetext.com/
re :
https://inguma.eu/projects/bokken
http://www.radare.org/r/
http://www.capstone-engine.org/
http://www.windbg.org/
https://msdn.microsoft.com/en-
us/library/windows/hardware/ff551063(v=vs.85)
.aspx
http://www.gnu.org/software/gdb/
http://lldb.llvm.org/
virtual :
https://www.virtualbox.org/
http://bochs.sourceforge.net/
http://wiki.qemu.org/Main_Page
tools:
http://www.farmanager.com/
http://www.hiew.ru/
http://conemu.github.io/
https://www.cygwin.com/
https://github.com/Z3Prover/z3
http://rise4fun.com/z3/tutorial
http://www.capstone-engine.org/
https://github.com/
https://technet.microsoft.com/sk-
sk/sysinternals/bb896653
References - events
http://ctf.codegate.org/
https://ctf.0ops.sjtu.cn/
https://legitbs.net/
http://ghostintheshellcode.com/
http://play.plaidctf.com/
https://ctf.dragonsector.pl/
https://github.com/ctfs/write-ups-2015/
http://uva.onlinejudge.org/
https://www.topcoder.com/community/data-
science/data-science-tutorials/
https://arena.topcoder.com/#/a/home
http://zenit.edu.sk/
https://www.ksp.sk/
http://people.ksp.sk/~acm/welcome.php

More Related Content

PPTX
Hacking - high school intro
PDF
When is something overflowing
PPTX
How Safe is your Link ?
PPTX
Ice Age melting down: Intel features considered usefull!
PDF
Rainbow Over the Windows: More Colors Than You Could Expect
PPTX
Racing with Droids
PPTX
You didnt see it’s coming? "Dawn of hardened Windows Kernel"
PPTX
Power of linked list
Hacking - high school intro
When is something overflowing
How Safe is your Link ?
Ice Age melting down: Intel features considered usefull!
Rainbow Over the Windows: More Colors Than You Could Expect
Racing with Droids
You didnt see it’s coming? "Dawn of hardened Windows Kernel"
Power of linked list

What's hot (20)

PPTX
Attack on the Core
PDF
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attac
PDF
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
PDF
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
PPTX
BSides Hannover 2015 - Shell on Wheels
PPTX
Back to the CORE
PPTX
Steelcon 2014 - Process Injection with Python
PPTX
Guardians of your CODE
PPTX
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
PPTX
Steelcon 2015 - 0wning the internet of trash
PDF
PDF
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
PDF
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
PPTX
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
PPTX
Adventures in Asymmetric Warfare
PPTX
Invoke-Obfuscation nullcon 2017
PDF
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin Vigo
PDF
Introduction to Browser Fuzzing
PDF
Process injection - Malware style
PDF
Exploitation and State Machines
Attack on the Core
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attac
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
BSides Hannover 2015 - Shell on Wheels
Back to the CORE
Steelcon 2014 - Process Injection with Python
Guardians of your CODE
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Steelcon 2015 - 0wning the internet of trash
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Adventures in Asymmetric Warfare
Invoke-Obfuscation nullcon 2017
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin Vigo
Introduction to Browser Fuzzing
Process injection - Malware style
Exploitation and State Machines
Ad

Viewers also liked (12)

PPTX
Upfront adoption & migration of applications to latest jdk
PPTX
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURE
PDF
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
PDF
SmartphoneHacking_Android_Exploitation
PDF
Find your own iOS kernel bug
PDF
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
DOCX
Vijay Amarnath - Updated
PDF
Targeting the iOS kernel
PDF
DeathNote of Microsoft Windows Kernel
PDF
Moony li pacsec-1.8
PPTX
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
PDF
SyScan360 - Stefan Esser - OS X El Capitan sinking the S\H/IP
Upfront adoption & migration of applications to latest jdk
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURE
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
SmartphoneHacking_Android_Exploitation
Find your own iOS kernel bug
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
Vijay Amarnath - Updated
Targeting the iOS kernel
DeathNote of Microsoft Windows Kernel
Moony li pacsec-1.8
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
SyScan360 - Stefan Esser - OS X El Capitan sinking the S\H/IP
Ad

Similar to Software Security : From school to reality and back! (20)

PPT
CPP12 - Algorithms
PPTX
20101017 program analysis_for_security_livshits_lecture03_security
PPT
Learning OOP Programming Concepts with Deep Dive
PDF
On being a professional software developer
PPTX
chap-1 : Vulnerabilities in Information Systems
PDF
Антон Кириллов, ZeptoLab
PPTX
Vulnerability, exploit to metasploit
DOC
Software Bugs A Software Architect Point Of View
PPTX
FDS Unit I_PPT.pptx
PDF
Chapter 5 information assurance and security
PDF
Test bank for Big Java: Early Objects 6th Edition by Horstmann
PDF
How To Win At Software - Advice for New Engineers - by Gabe Johnson
PPT
Evolving as a professional software developer
PDF
Inception: Tips and tricks I’ve learned reversing vulnerabilities!
PDF
Algorithms - a brief introduction
PDF
Rodrigo Branco - How Offensive Security is Defining the Way We Compute // Key...
PDF
ProdSec: A Technical Approach
PPT
4.Security Assessment And Testing
PDF
Test bank for Big Java: Early Objects 6th Edition by Horstmann
PPT
intro_juhy_of _art_of _hacking_ekdoskw.ppt
CPP12 - Algorithms
20101017 program analysis_for_security_livshits_lecture03_security
Learning OOP Programming Concepts with Deep Dive
On being a professional software developer
chap-1 : Vulnerabilities in Information Systems
Антон Кириллов, ZeptoLab
Vulnerability, exploit to metasploit
Software Bugs A Software Architect Point Of View
FDS Unit I_PPT.pptx
Chapter 5 information assurance and security
Test bank for Big Java: Early Objects 6th Edition by Horstmann
How To Win At Software - Advice for New Engineers - by Gabe Johnson
Evolving as a professional software developer
Inception: Tips and tricks I’ve learned reversing vulnerabilities!
Algorithms - a brief introduction
Rodrigo Branco - How Offensive Security is Defining the Way We Compute // Key...
ProdSec: A Technical Approach
4.Security Assessment And Testing
Test bank for Big Java: Early Objects 6th Edition by Horstmann
intro_juhy_of _art_of _hacking_ekdoskw.ppt

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
GDM (1) (1).pptx small presentation for students
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
master seminar digital applications in india
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Cell Structure & Organelles in detailed.
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
01-Introduction-to-Information-Management.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Institutional Correction lecture only . . .
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Insiders guide to clinical Medicine.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Complications of Minimal Access Surgery at WLH
Renaissance Architecture: A Journey from Faith to Humanism
GDM (1) (1).pptx small presentation for students
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
master seminar digital applications in india
2.FourierTransform-ShortQuestionswithAnswers.pdf
Sports Quiz easy sports quiz sports quiz
Microbial disease of the cardiovascular and lymphatic systems
Cell Structure & Organelles in detailed.
Pharma ospi slides which help in ospi learning
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
01-Introduction-to-Information-Management.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Institutional Correction lecture only . . .
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Insiders guide to clinical Medicine.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Software Security : From school to reality and back!