SlideShare a Scribd company logo
Real Life Hacking 101
1
Who am I ?
● Batard Florent
● http://code-artisan.io
● @artisan_code
● Security Engineer
– Ethical Hacker for 10 years
– Security Contests (0daysober)
– Globe Trotter (UK, USA, Swiss, France, Japan)
– Lately on the Defense side as a programmer
test
Summary
● Introduction
● Information gathering
● Indirect requests
● Direct requests
● System security
● Configuration errors
● Password policy
● Patching
● Web Security
– XSS
– SQL Injection
– CSRF
test
What is Hacking ?
Use or abuse a resources in way that was not predicted by the
creator in order to change the behavior
test
Attack chronology
● Information gathering
● Getting information about the target
● Indirect / Direct requests
● Fingerprinting
● Analysis
● Determing the security flaw
● Discover the tools to perform the attack
● Attack
● Exploitation
● Expand in the network
● Spread in the internal network
test
Information gathering
• Introduction
• Indirect requests
• Direct requests
• Fingerprinting
test
Introduction
● The first step of any attack is the information gathering
process
● Identify the entry point of the target
● List all the public information we can use
● Other information can be gathered with technical
tools
● The most effective way is the « social
engineering »
– Contact the target and ask him sensitive
information (Freshman, secretary...)
test
Indirect requests
● « Whois » database listing
● All the information asked at registration process
– Administrative informations
● Name, address, phone number
– Technical information
● DNS server
● Email addresses for social engineering
● IP range of the target
● All these information are public
test
WHOIS
● Use of the tool « whois »
● whois domain.tld ou whois IP address
Domain Information:
a. [Domain Name] WHIZZ-TECH.CO.JP
g. [Organization] Whizz Technology Co., Ltd.
l. [Organization Type] Company
m. [Administrative Contact] HS9536JP
n. [Technical Contact] HS9536JP
p. [Name Server] ns1.whizz-tech.co.jp
s. [Signing Key]
[State] Connected (2015/03/31)
[Registered Date] 2005/03/29
[Connected Date] 2005/06/18
[Last Update] 2014/04/01 01:41:01 (JST)
Contact Information: [ 担当者情報 ]
a. [JPNIC ハンドル ] HS9536JP
b. [ 氏名 ] 杉本 展将
c. [Last, First] Sugimoto, Hi-
royuki
d. [ 電子メイル ] hiroyuki@whi-
temap.net
f. [ 組織名 ] 有限会社ウィズテ
クノロジー
g. [Organization] Whizz Techno-
logy Co., Ltd.
k. [ 部署 ]
l. [Division]
m. [ 肩書 ] 代表取締役
n. [Title] President
o. [ 電話番号 ] 06-6242-7288
p. [FAX 番号 ]
y. [ 通知アドレス ]
[ 最終更新 ] 2005/03/29
12:02:01 (JST)
form@dom.jprs.jp
test
Indirect requests
● SNS
– Every bit of public information published can be
used against you
– Information are used to build password bank tailo-
red to hack you(https://github.com/Netflix/Scumblr)
● People Search
– https://pipl.com/
– http://www.peekyou.com/
test
Direct requests
● Active discoveries on the network
● Port scan
– Identify open ports
– Several methods can be used
● Fingerprinting
– Getting the banner of services
– Identify service and its version
– Identify the Operating System
test
Nmap scanning
● Nmap for fingerprinting
● Nmap -A x.x.x.x
test
Nmap Example
test
Other methods
● SNMP
● Identify SNMP community
– Get information on the target
● Netbios
● Communication protocol for windows
– Guest/Null account sometimes activated
● Enumerate shared_folder
● Enumerate users/groups/administrators
test
Social Engineering
● The art of manipulating people to make them reveal
sensitive information
● Phone the target pretending to be someone else
● The victim often doesn't realize what she is
doing
● We will use everything we discovered on indirect
requests
● Most of the time it's the most effective way to retrieve
useful information
● Difficult to protect your company
test
System vulnerabilities
• Configuration mistakes
• Passwords
• Patching
test
System vulnerability
● What is a « system » vulnerability ?
● Configuration mistake
– Leave the default configuration
– High privilege for low task
● Bad password policy
– Default password
– Weak password
● Bad patching policy
– New vulnerabilities but OS are not up to date
● Easy exploitation
test
System vulnerability
test
Configuration error
● Development configuration kept after production de-
ployment
● Devices
– Default SNMP community
– Installation password
● Applications
– Default password
– Debugging activated
– Example files
test
Password policy
● The most secure system will always be weak if protec-
ted by a too simple password
● Usually people will choose the easiest password
a system can accept
– Hacking is even easier if passwords aren't
strong enough
● Passwords should be encrypted in the
application
– If a hacker get into database, all passwords
will be revealed
● Users usually re-use the same password
everywhere
test
Password types
● Not accessible (stored in database)
● Hacker must interactively break the password
and cause noisy logs
● Encrypted/Hashed passwords
● Allow discrete offline attacks
● ClearText passwords
● = win!
test
Password attacks
● Interactive
● No encrypted version of the password
– Medusa
– Hydra
● Slow and noisy
● Offline
● Possess an encrypted version of password
– John The Ripper
– Cain
– L0phtcrack
● Quick and discrete but not always possible
test
Patching
● Update management
● Need a security policy in the company
● Last patches should always be deployed on ALL
machines
● One vulnerable computer can be the entry point
for the whole network
● As an attacker it's always more convenient to
attack the most vulnerable machine on the
network
● Tools to know : Metasploit, Nessus
test
Problems
● Vulnerabilities are often released publicly
● Accessible for anybody
● Automatic script to exploit them
● Typically
● Discovery through a vulnerability scanner like
Nessus
● Exploit the vulnerability with Metasploit
– At the end → total control of the target
test
Web Application Vulnerabilities
• Cross-Site Scripting
• SQL Injection
• CSRF Attack
test
Application Vulnerabilities
● Target a specific application
● Out of scope for system administrator
● Developers responsability
● The hacker can modify the behavior of the application
● Use of the application that wasn't planned by the
developers
● Nowadays, most likely in web applications
test
Parameters
● User can interact with website through parameters :
● GET : parameters sent in the URL
– search.php?query=toto
● POST : parameters sent in the message body
– Usually for forms submission
● These parameters can ALWAYS be tampered by
an attacker
● Tools to know : BurpSuite, Owasp ZAP,
Postman
test
Cross-Site Scripting
● Allow code execution in the browser , most likely in
Javascript
● Problem occurs when user inputs are interpreted
as regular client-side source code.
● Hacker can inject HTML tags and Javascript
inside the page
– Control over the display of the page
● Images
● Javascript (Framework & Components)
● Use your page for evil purpose
http://beefproject.com
test
XSS - Example
● Vulnerable source code
● Normal Behavior Hijacked
test
SQL Injection
● Langage used to query databases
● To select data :
– SELECT column_name FROM table WHERE
condition
● Exemple
– SELECT contenu FROM news WHERE id=1
● Used by website to retrieve persistent information
test
SQL Injection examples
● Original request :
● http://site/news.php?id=1
– SELECT * FROM news WHERE id = 1
– Return the news with the id : 1
● Hijacked request :
● http://site/news.php?id=1 OR 1=1
– SELECT * FROM news WHERE id = 1 OR
1=1 // TRUE
– Return all the news !
test
SQL Injection example
● Vulnerable code
● Normal behavior Hijacked
test
Goal for the hacker
● Hijack authentication process
● Explore the database
● Retrieve hidden information
– Passwords of users and admin
● Interaction with the system through database
● Read file
● Write files
● Command execution
test
Cross Site Request Forgery
● Scenario :
● http://mybank.com/?transfer=100&from=123&to=321
● You have a session active => request accepted
● What if I send you that link in a iframe or a mail ?
– I can forge an address to compromise you
– Session is still active so it will be accepted
– CSRF-token = unpredictable token we cannot forge
● We set email or reset password
test
What to do as a developer ?
● Learn the basics of security (www.owasp.org)
– OWASP Top 10
● Check your application source code
– OWASP ASVS http://code-artisan.io/owasp-asvs-3-0-cheatsheet/
● Add security tests case to your unit tests
– « OR 1 = 1 »
– « <script>alert(‘hello’)</script> »
● Check the security updates of your tools
– Web Frameworks Security Releases
– Change default configuration !
● Check your security with professional services
– Www.detectify.com OR https://vaddy.net/
– Yours truly
test
How to become a hacker ?
Train and learn
– WebGoat
– DVWA (Damn Vulnerable Web App)
– Kali Linux (Security Distribution with all tools)
● Check the tools :
– Metasploit
– SkipFish
– Nikto
– Wpscan
test
Conclusion
• Questions ?

More Related Content

What's hot

Basic Dynamic Analysis of Malware
Basic Dynamic Analysis of MalwareBasic Dynamic Analysis of Malware
Basic Dynamic Analysis of Malware
Natraj G
 
Cyber attacks 101
Cyber attacks 101Cyber attacks 101
Cyber attacks 101
Rafel Ivgi
 
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
Andrew Morris
 
Ch0 1
Ch0 1Ch0 1
Web security uploadv1
Web security uploadv1Web security uploadv1
Web security uploadv1
Setia Juli Irzal Ismail
 
Basic malware analysis
Basic malware analysisBasic malware analysis
Basic malware analysis
securityxploded
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
Priyanka Aash
 
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
CODE BLUE
 
Fileless Malware Infections
Fileless Malware InfectionsFileless Malware Infections
Fileless Malware Infections
Ramon
 
Malware analysis - What to learn from your invaders
Malware analysis - What to learn from your invadersMalware analysis - What to learn from your invaders
Malware analysis - What to learn from your invaders
Tazdrumm3r
 
Ethical hacking 101 - Singapore RSA 2019
Ethical hacking 101 - Singapore RSA 2019Ethical hacking 101 - Singapore RSA 2019
Ethical hacking 101 - Singapore RSA 2019
Paul Haskell-Dowland
 
Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and More
CTruncer
 
A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
Sergey Soldatov
 
Ch14 security
Ch14   securityCh14   security
Ch14 security
Welly Dian Astika
 
Metasploit
MetasploitMetasploit
Metasploit
Parth Sahu
 
The Hunter Games: How to Find the Adversary with Event Query Language
The Hunter Games: How to Find the Adversary with Event Query LanguageThe Hunter Games: How to Find the Adversary with Event Query Language
The Hunter Games: How to Find the Adversary with Event Query Language
Ross Wolf
 
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
PROIDEA
 
Hacking with Remote Admin Tools (RAT)
 Hacking with Remote Admin Tools (RAT) Hacking with Remote Admin Tools (RAT)
Hacking with Remote Admin Tools (RAT)
Zoltan Balazs
 
Analysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware KitsAnalysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware Kits
Rahul Mohandas
 

What's hot (20)

Basic Dynamic Analysis of Malware
Basic Dynamic Analysis of MalwareBasic Dynamic Analysis of Malware
Basic Dynamic Analysis of Malware
 
Cyber attacks 101
Cyber attacks 101Cyber attacks 101
Cyber attacks 101
 
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on ...
 
Ch0 1
Ch0 1Ch0 1
Ch0 1
 
Web security uploadv1
Web security uploadv1Web security uploadv1
Web security uploadv1
 
Basic malware analysis
Basic malware analysisBasic malware analysis
Basic malware analysis
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
 
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
 
Fileless Malware Infections
Fileless Malware InfectionsFileless Malware Infections
Fileless Malware Infections
 
Malware analysis - What to learn from your invaders
Malware analysis - What to learn from your invadersMalware analysis - What to learn from your invaders
Malware analysis - What to learn from your invaders
 
Ethical hacking 101 - Singapore RSA 2019
Ethical hacking 101 - Singapore RSA 2019Ethical hacking 101 - Singapore RSA 2019
Ethical hacking 101 - Singapore RSA 2019
 
Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and More
 
A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
 
Information gath
Information gathInformation gath
Information gath
 
Ch14 security
Ch14   securityCh14   security
Ch14 security
 
Metasploit
MetasploitMetasploit
Metasploit
 
The Hunter Games: How to Find the Adversary with Event Query Language
The Hunter Games: How to Find the Adversary with Event Query LanguageThe Hunter Games: How to Find the Adversary with Event Query Language
The Hunter Games: How to Find the Adversary with Event Query Language
 
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
 
Hacking with Remote Admin Tools (RAT)
 Hacking with Remote Admin Tools (RAT) Hacking with Remote Admin Tools (RAT)
Hacking with Remote Admin Tools (RAT)
 
Analysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware KitsAnalysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware Kits
 

Viewers also liked

The 7 Toughest Challenges to Building Successful Products and Companies and h...
The 7 Toughest Challenges to Building Successful Products and Companies and h...The 7 Toughest Challenges to Building Successful Products and Companies and h...
The 7 Toughest Challenges to Building Successful Products and Companies and h...
Silicon Valley ProductCamp
 
NEHA PowerPoint FINAL
NEHA PowerPoint FINALNEHA PowerPoint FINAL
NEHA PowerPoint FINALMegan Jourdan
 
RPKI Deployment Status in Bangladesh
RPKI Deployment Status in Bangladesh RPKI Deployment Status in Bangladesh
RPKI Deployment Status in Bangladesh
Bangladesh Network Operators Group
 
HD3000 Playable Graphics Games (Dx 10.1)
HD3000 Playable Graphics Games (Dx 10.1)HD3000 Playable Graphics Games (Dx 10.1)
HD3000 Playable Graphics Games (Dx 10.1)
University of Education, Lower Mall, Lahore
 
Mulher Trabalhadora que amamenta
Mulher Trabalhadora que amamenta Mulher Trabalhadora que amamenta
Mulher Trabalhadora que amamenta
Silvia Marina Anaruma
 
Informática
InformáticaInformática
Informática
Angel Lockwood
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
Pradhan Rishi Sharma
 
Predictive Analytics World Germany 2015
Predictive Analytics World Germany 2015Predictive Analytics World Germany 2015
Predictive Analytics World Germany 2015
Rising Media Ltd.
 
K to 12 SHS Voucher Program
K to 12  SHS Voucher ProgramK to 12  SHS Voucher Program
K to 12 SHS Voucher Program
Dr. Joy Kenneth Sala Biasong
 
Status of-women-in-islam
Status of-women-in-islamStatus of-women-in-islam
Status of-women-in-islamAsif Khan
 

Viewers also liked (14)

black board
black boardblack board
black board
 
The 7 Toughest Challenges to Building Successful Products and Companies and h...
The 7 Toughest Challenges to Building Successful Products and Companies and h...The 7 Toughest Challenges to Building Successful Products and Companies and h...
The 7 Toughest Challenges to Building Successful Products and Companies and h...
 
NEHA PowerPoint FINAL
NEHA PowerPoint FINALNEHA PowerPoint FINAL
NEHA PowerPoint FINAL
 
Erakonnad
ErakonnadErakonnad
Erakonnad
 
RPKI Deployment Status in Bangladesh
RPKI Deployment Status in Bangladesh RPKI Deployment Status in Bangladesh
RPKI Deployment Status in Bangladesh
 
HD3000 Playable Graphics Games (Dx 10.1)
HD3000 Playable Graphics Games (Dx 10.1)HD3000 Playable Graphics Games (Dx 10.1)
HD3000 Playable Graphics Games (Dx 10.1)
 
Mulher Trabalhadora que amamenta
Mulher Trabalhadora que amamenta Mulher Trabalhadora que amamenta
Mulher Trabalhadora que amamenta
 
Informática
InformáticaInformática
Informática
 
Bodytech caso
Bodytech casoBodytech caso
Bodytech caso
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
SHS Orientation_SY-2016-2017
SHS Orientation_SY-2016-2017SHS Orientation_SY-2016-2017
SHS Orientation_SY-2016-2017
 
Predictive Analytics World Germany 2015
Predictive Analytics World Germany 2015Predictive Analytics World Germany 2015
Predictive Analytics World Germany 2015
 
K to 12 SHS Voucher Program
K to 12  SHS Voucher ProgramK to 12  SHS Voucher Program
K to 12 SHS Voucher Program
 
Status of-women-in-islam
Status of-women-in-islamStatus of-women-in-islam
Status of-women-in-islam
 

Similar to Real life hacking101

CISSP Week 14
CISSP Week 14CISSP Week 14
CISSP Week 14jemtallon
 
2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection
APNIC
 
The Golden Rules - Detecting more with RSA Security Analytics
The Golden Rules  - Detecting more with RSA Security AnalyticsThe Golden Rules  - Detecting more with RSA Security Analytics
The Golden Rules - Detecting more with RSA Security Analytics
Demetrio Milea
 
Cambodia CERT Seminar: Incident response for ransomeware attacks
Cambodia CERT Seminar: Incident response for ransomeware attacksCambodia CERT Seminar: Incident response for ransomeware attacks
Cambodia CERT Seminar: Incident response for ransomeware attacks
APNIC
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers
OWASP
 
Online Sync meetup: Metasploit 101 slides
Online Sync meetup: Metasploit 101 slidesOnline Sync meetup: Metasploit 101 slides
Online Sync meetup: Metasploit 101 slides
cyberforgeacademy
 
Secure coding guidelines
Secure coding guidelinesSecure coding guidelines
Secure coding guidelines
Zakaria SMAHI
 
Protecting Financial Networks from Cyber Crime
Protecting Financial Networks from Cyber CrimeProtecting Financial Networks from Cyber Crime
Protecting Financial Networks from Cyber Crime
Lancope, Inc.
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while Persisting
CTruncer
 
No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016
Matthew Dunwoody
 
Secure Android Development
Secure Android DevelopmentSecure Android Development
Secure Android Development
Shaul Rosenzwieg
 
INTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptx
INTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptxINTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptx
INTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptx
SuhailShaik16
 
NETWORK PENETRATION TESTING
NETWORK PENETRATION TESTINGNETWORK PENETRATION TESTING
NETWORK PENETRATION TESTING
Er Vivek Rana
 
L27
L27L27
Pen-Testing with Metasploit
Pen-Testing with MetasploitPen-Testing with Metasploit
Pen-Testing with Metasploit
Mohammed Danish Amber
 
Security .NET.pdf
Security .NET.pdfSecurity .NET.pdf
Security .NET.pdf
Abhi Jain
 
Ccsit cyberlympics 2017 workshop 3 - presentation
Ccsit cyberlympics 2017  workshop 3 - presentationCcsit cyberlympics 2017  workshop 3 - presentation
Ccsit cyberlympics 2017 workshop 3 - presentation
Nasir Bhutta
 
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Chris Gates
 

Similar to Real life hacking101 (20)

CISSP Week 14
CISSP Week 14CISSP Week 14
CISSP Week 14
 
2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection
 
The Golden Rules - Detecting more with RSA Security Analytics
The Golden Rules  - Detecting more with RSA Security AnalyticsThe Golden Rules  - Detecting more with RSA Security Analytics
The Golden Rules - Detecting more with RSA Security Analytics
 
Cambodia CERT Seminar: Incident response for ransomeware attacks
Cambodia CERT Seminar: Incident response for ransomeware attacksCambodia CERT Seminar: Incident response for ransomeware attacks
Cambodia CERT Seminar: Incident response for ransomeware attacks
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers
 
Online Sync meetup: Metasploit 101 slides
Online Sync meetup: Metasploit 101 slidesOnline Sync meetup: Metasploit 101 slides
Online Sync meetup: Metasploit 101 slides
 
Secure coding guidelines
Secure coding guidelinesSecure coding guidelines
Secure coding guidelines
 
ETHICAL HACKING
ETHICAL HACKING ETHICAL HACKING
ETHICAL HACKING
 
Protecting Financial Networks from Cyber Crime
Protecting Financial Networks from Cyber CrimeProtecting Financial Networks from Cyber Crime
Protecting Financial Networks from Cyber Crime
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while Persisting
 
No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016
 
Sql securitytesting
Sql  securitytestingSql  securitytesting
Sql securitytesting
 
Secure Android Development
Secure Android DevelopmentSecure Android Development
Secure Android Development
 
INTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptx
INTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptxINTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptx
INTERNSHIPREVIEW-ISHAQ (1) [Recovered].pptx
 
NETWORK PENETRATION TESTING
NETWORK PENETRATION TESTINGNETWORK PENETRATION TESTING
NETWORK PENETRATION TESTING
 
L27
L27L27
L27
 
Pen-Testing with Metasploit
Pen-Testing with MetasploitPen-Testing with Metasploit
Pen-Testing with Metasploit
 
Security .NET.pdf
Security .NET.pdfSecurity .NET.pdf
Security .NET.pdf
 
Ccsit cyberlympics 2017 workshop 3 - presentation
Ccsit cyberlympics 2017  workshop 3 - presentationCcsit cyberlympics 2017  workshop 3 - presentation
Ccsit cyberlympics 2017 workshop 3 - presentation
 
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
 

Recently uploaded

DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 

Recently uploaded (20)

DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 

Real life hacking101

  • 2. Who am I ? ● Batard Florent ● http://code-artisan.io ● @artisan_code ● Security Engineer – Ethical Hacker for 10 years – Security Contests (0daysober) – Globe Trotter (UK, USA, Swiss, France, Japan) – Lately on the Defense side as a programmer
  • 3. test Summary ● Introduction ● Information gathering ● Indirect requests ● Direct requests ● System security ● Configuration errors ● Password policy ● Patching ● Web Security – XSS – SQL Injection – CSRF
  • 4. test What is Hacking ? Use or abuse a resources in way that was not predicted by the creator in order to change the behavior
  • 5. test Attack chronology ● Information gathering ● Getting information about the target ● Indirect / Direct requests ● Fingerprinting ● Analysis ● Determing the security flaw ● Discover the tools to perform the attack ● Attack ● Exploitation ● Expand in the network ● Spread in the internal network
  • 6. test Information gathering • Introduction • Indirect requests • Direct requests • Fingerprinting
  • 7. test Introduction ● The first step of any attack is the information gathering process ● Identify the entry point of the target ● List all the public information we can use ● Other information can be gathered with technical tools ● The most effective way is the « social engineering » – Contact the target and ask him sensitive information (Freshman, secretary...)
  • 8. test Indirect requests ● « Whois » database listing ● All the information asked at registration process – Administrative informations ● Name, address, phone number – Technical information ● DNS server ● Email addresses for social engineering ● IP range of the target ● All these information are public
  • 9. test WHOIS ● Use of the tool « whois » ● whois domain.tld ou whois IP address Domain Information: a. [Domain Name] WHIZZ-TECH.CO.JP g. [Organization] Whizz Technology Co., Ltd. l. [Organization Type] Company m. [Administrative Contact] HS9536JP n. [Technical Contact] HS9536JP p. [Name Server] ns1.whizz-tech.co.jp s. [Signing Key] [State] Connected (2015/03/31) [Registered Date] 2005/03/29 [Connected Date] 2005/06/18 [Last Update] 2014/04/01 01:41:01 (JST) Contact Information: [ 担当者情報 ] a. [JPNIC ハンドル ] HS9536JP b. [ 氏名 ] 杉本 展将 c. [Last, First] Sugimoto, Hi- royuki d. [ 電子メイル ] hiroyuki@whi- temap.net f. [ 組織名 ] 有限会社ウィズテ クノロジー g. [Organization] Whizz Techno- logy Co., Ltd. k. [ 部署 ] l. [Division] m. [ 肩書 ] 代表取締役 n. [Title] President o. [ 電話番号 ] 06-6242-7288 p. [FAX 番号 ] y. [ 通知アドレス ] [ 最終更新 ] 2005/03/29 12:02:01 (JST) form@dom.jprs.jp
  • 10. test Indirect requests ● SNS – Every bit of public information published can be used against you – Information are used to build password bank tailo- red to hack you(https://github.com/Netflix/Scumblr) ● People Search – https://pipl.com/ – http://www.peekyou.com/
  • 11. test Direct requests ● Active discoveries on the network ● Port scan – Identify open ports – Several methods can be used ● Fingerprinting – Getting the banner of services – Identify service and its version – Identify the Operating System
  • 12. test Nmap scanning ● Nmap for fingerprinting ● Nmap -A x.x.x.x
  • 14. test Other methods ● SNMP ● Identify SNMP community – Get information on the target ● Netbios ● Communication protocol for windows – Guest/Null account sometimes activated ● Enumerate shared_folder ● Enumerate users/groups/administrators
  • 15. test Social Engineering ● The art of manipulating people to make them reveal sensitive information ● Phone the target pretending to be someone else ● The victim often doesn't realize what she is doing ● We will use everything we discovered on indirect requests ● Most of the time it's the most effective way to retrieve useful information ● Difficult to protect your company
  • 16. test System vulnerabilities • Configuration mistakes • Passwords • Patching
  • 17. test System vulnerability ● What is a « system » vulnerability ? ● Configuration mistake – Leave the default configuration – High privilege for low task ● Bad password policy – Default password – Weak password ● Bad patching policy – New vulnerabilities but OS are not up to date ● Easy exploitation
  • 19. test Configuration error ● Development configuration kept after production de- ployment ● Devices – Default SNMP community – Installation password ● Applications – Default password – Debugging activated – Example files
  • 20. test Password policy ● The most secure system will always be weak if protec- ted by a too simple password ● Usually people will choose the easiest password a system can accept – Hacking is even easier if passwords aren't strong enough ● Passwords should be encrypted in the application – If a hacker get into database, all passwords will be revealed ● Users usually re-use the same password everywhere
  • 21. test Password types ● Not accessible (stored in database) ● Hacker must interactively break the password and cause noisy logs ● Encrypted/Hashed passwords ● Allow discrete offline attacks ● ClearText passwords ● = win!
  • 22. test Password attacks ● Interactive ● No encrypted version of the password – Medusa – Hydra ● Slow and noisy ● Offline ● Possess an encrypted version of password – John The Ripper – Cain – L0phtcrack ● Quick and discrete but not always possible
  • 23. test Patching ● Update management ● Need a security policy in the company ● Last patches should always be deployed on ALL machines ● One vulnerable computer can be the entry point for the whole network ● As an attacker it's always more convenient to attack the most vulnerable machine on the network ● Tools to know : Metasploit, Nessus
  • 24. test Problems ● Vulnerabilities are often released publicly ● Accessible for anybody ● Automatic script to exploit them ● Typically ● Discovery through a vulnerability scanner like Nessus ● Exploit the vulnerability with Metasploit – At the end → total control of the target
  • 25. test Web Application Vulnerabilities • Cross-Site Scripting • SQL Injection • CSRF Attack
  • 26. test Application Vulnerabilities ● Target a specific application ● Out of scope for system administrator ● Developers responsability ● The hacker can modify the behavior of the application ● Use of the application that wasn't planned by the developers ● Nowadays, most likely in web applications
  • 27. test Parameters ● User can interact with website through parameters : ● GET : parameters sent in the URL – search.php?query=toto ● POST : parameters sent in the message body – Usually for forms submission ● These parameters can ALWAYS be tampered by an attacker ● Tools to know : BurpSuite, Owasp ZAP, Postman
  • 28. test Cross-Site Scripting ● Allow code execution in the browser , most likely in Javascript ● Problem occurs when user inputs are interpreted as regular client-side source code. ● Hacker can inject HTML tags and Javascript inside the page – Control over the display of the page ● Images ● Javascript (Framework & Components) ● Use your page for evil purpose http://beefproject.com
  • 29. test XSS - Example ● Vulnerable source code ● Normal Behavior Hijacked
  • 30. test SQL Injection ● Langage used to query databases ● To select data : – SELECT column_name FROM table WHERE condition ● Exemple – SELECT contenu FROM news WHERE id=1 ● Used by website to retrieve persistent information
  • 31. test SQL Injection examples ● Original request : ● http://site/news.php?id=1 – SELECT * FROM news WHERE id = 1 – Return the news with the id : 1 ● Hijacked request : ● http://site/news.php?id=1 OR 1=1 – SELECT * FROM news WHERE id = 1 OR 1=1 // TRUE – Return all the news !
  • 32. test SQL Injection example ● Vulnerable code ● Normal behavior Hijacked
  • 33. test Goal for the hacker ● Hijack authentication process ● Explore the database ● Retrieve hidden information – Passwords of users and admin ● Interaction with the system through database ● Read file ● Write files ● Command execution
  • 34. test Cross Site Request Forgery ● Scenario : ● http://mybank.com/?transfer=100&from=123&to=321 ● You have a session active => request accepted ● What if I send you that link in a iframe or a mail ? – I can forge an address to compromise you – Session is still active so it will be accepted – CSRF-token = unpredictable token we cannot forge ● We set email or reset password
  • 35. test What to do as a developer ? ● Learn the basics of security (www.owasp.org) – OWASP Top 10 ● Check your application source code – OWASP ASVS http://code-artisan.io/owasp-asvs-3-0-cheatsheet/ ● Add security tests case to your unit tests – « OR 1 = 1 » – « <script>alert(‘hello’)</script> » ● Check the security updates of your tools – Web Frameworks Security Releases – Change default configuration ! ● Check your security with professional services – Www.detectify.com OR https://vaddy.net/ – Yours truly
  • 36. test How to become a hacker ? Train and learn – WebGoat – DVWA (Damn Vulnerable Web App) – Kali Linux (Security Distribution with all tools) ● Check the tools : – Metasploit – SkipFish – Nikto – Wpscan