SlideShare a Scribd company logo
1 of 47
Download to read offline
S O H O p e l e s s l y B r o k e n
A Hacker’s Perspective on Embedded
Device Security
Who Am I?
ISE Confidential - not for distribution
Paul Dant
Chief Strategist @ ISE
9: First digital product
13: First legit black hat hack
17: First hacker caught
19: First legit white hat hack
(p0wned a bank data
processing center as part of
a compliance audit)
About ISE
• We are:
- Ethical Hackers
- Computer Scientists
• Our clients are:
- Fortune 500 Enterprises
- Entertainment, Security Software, Healthcare
• Our perspective is:
– Everything is broken!
– White hat testing rules
Why Should You Listen To Us?
• 100% of network systems evaluated were
vulnerable to exploitation.
• Routers and storage systems are not the
only embedded devices with egregious
deficiencies.
• These systems CAN and ARE being mass
exploited.
#SOHOpelessly Broken
HACK ROUTERS AND GET PAID
https://sohopelesslybroken.com
DEFCON 23, DerbyCon v4.0, BSIDES DC, ToorCon
We launched the first IoT Village @ DEFCON 23
ISE Confidential | Not for Distribution
ISE IoT Village DEF CON 23
Agenda
Embedded Device Security Risks
Why Do We Care?
Hacking Methodology
Real World Examples
What Can We Do?
Summary and Q&A
ISE Confidential | Not for Distribution
Embedded Device Security Risks
• Large attack surface
• Default configurations are typically not
secure at all
• Assumption of security on the (wireless) LAN
• Poor security design and implementation
Why Do We Care?
• Large attack surface
• Insecure by default
• Assumption of
security on the
(wireless) LAN
• Poor (or missing!)
security design and
implementation
Hacking Methodology
• Information Gathering
• Scanning and Enumeration
• Gaining Access
• Maintaining Access
Information Gathering
• Administration Settings
– Default credentials
– Management interface(s)
• WLAN Settings
– SSID and wireless encryption
• Network Service Settings
– DHCP, DNS, SNMP, UPnP, SMB, FTP, etc.
Scanning and Enumeration
• Identifying active hosts
• Identifying open TCP/UDP ports
• Identifying running services and versions
Scanning and Enumeration Cont.
Port Scan
Banner Grab
TCP: nmap –sS –Pn –sV –p T:1-65535 X.X.X.X
UDP: nmap –sU –Pn –p U:1-65535 X.X.X.X
Netcat: nc –nv <X.X.X.X> <port>
Gaining Access
• Service Investigation
– Analyze web applications
– Analyze servers (e.g., FTP, SMTP, SMB, HTTP)
– Source Code Review (Static Code Analysis)
– Fuzz Network Services (Dynamic Analysis)
Analyzing Web Applications
• Understand the application
– Programming languages used
• Server side (e.g., PHP, .NET, Python, ASP, Ruby on Rails)
• Client side (e.g., JavaScript, HTML, JSON, Flash)
– Protocols and APIs used (e.g., SOAP, REST)
– Internet Media Type/MIME (e.g., JavaScript, HTML)
• Toolz
– Web proxy (i.e., Burpsuite)
– Firebug (JavaScript debugger, HTML inspection)
– Web Crawler
Analyzing Web Applications Cont.
Burpsuite
Firebug
Analyzing Network Servers
• Authentication
– Type (e.g., Password, Key Pair)
– Anonymous access/Weak or no credentials
– Misconfigurations (e.g., Directory listing, permissions)
• Encryption
– SSL/TLS?
– SSH (AES, 3DES)?
Static Code Analysis
• If source code is available, GET IT!
• Things to look for:
– Logic flaws (e.g., authentication, authorization)
– Functions not performing bounds-checking
– Backdoors
Fuzzing (Dynamic Analysis)
• What happens if peculiar input is introduced?
– A{-G42!BBB}}}}}}///}}}}}}+=-_-1234d`~~((.)_(.))$
– AAAAAAAAAAAAAAAAAAAAAAAAAA
• Fuzzers
– SPIKE: generic_send_tcp X.X.X.X 21 ftp.spk 0 0
– BED: ./bed.pl -s HTTP -t X.X.X.X -p 80
– Metasploit Framework
– Python!
SPIKE
Spike
Template
(*.spk)
SPIKE Cont.
Fuzzing with Spike
Analyze Fuzzing Results
• Toolz
– Debugger (i.e., GDB)
– System Call Tracer (i.e., strace)
*Debugging ASUS
RT-AC66U exploit
Gaining Access
• Reverse Engineering
– System Binaries
• Simple RE Toolz and Techniques
– Strings
– Hexdump
– Grep
– Open source? Perform static analysis!
• Exploit Development
Reverse Engineering Toolz and
Techniques
• Strings: strings –n <INT> <FILE>
*TP-Link TL-1043ND Firmware
Reverse Engineering Toolz and
Techniques
• Grep: grep –R <string> *
*Code from the TRENDnet TEW-812DRU
Exploit Development
• Cross-Site Request Forgery
• Command Injection
• Missing Function Level Access Control
– Authentication Bypass
– Authorization Bypass
• Directory Traversal
• Buffer Overflow
Cross-Site Request Forgery
#define: CSRF is an attack
that forces an unsuspecting victim
into executing web commands
that perform unwanted actions on
a web application.
Gimppy
(Attacker)
Jad
(Victim)
Web
Application
Attacker
Web Server
Testing for Cross-Site Request Forgery
• Anti-CSRF Tokens?
• HTTP referrer checking?
Cross-Site Request Forgery
Countermeasures
• Users
– Logout of web applications
– Do NOT save credentials in your browser
• Developers
– Implement Anti-CSRF tokens AND HTTP
referrer checking
– Feeling ambitious? Require the user to
authenticate before performing a state change
Command Injection
#define:
Command Injection
is a form of attack
where operating
system specific
commands are
injected into a
vulnerable application
for execution.
Testing for Command Injection
• Survey the application
– Look for application features that could call underlying
system functionality(e.g., ping, traceroute)
– Source code? Static analysis!
• Test Examples
– ifconfig ; cat /etc/passwd  Linux
– dir | ipconfig  Windows/Linux
– ls /var/www/`<cmd>` or $(<cmd>)  Linux**Command substitution
Command Injection – Vulnerable Code
<?php
$dig=shell_exec("dig {$_GET['Domain']}");
echo($dig);
?>
Command Injection Countermeasures
• Developers
– Avoid calling shell commands when possible
– If an API does not exist, sanitize user input
before passing it to a function that executes
system commands.
• Python Example
– BAD: os.system(‘ls ‘ + dir)
– GOOD: os.listdir(dir)
Missing Function Level Access Control
#define: The absence of
server-side authentication and
authorization checks.
Testing for Missing Function Level
Access Control
• Calling privileged API’s as an
unprivileged user.
• Accessing system resources that do
not belong to the attacker.
– Insecure Direct Object Reference
– Direct Request/Forced Browsing
Missing Function Level Access Controls
Countermeasures
• Developers
– Perform server-side authentication and
authorization checks.
Directory Traversal
#define: Directory Traversal is a form of attack where an
attacker can access files and directories outside of the
intended directory.
Testing for Directory Traversal
• Enumerate the application
– Are there commands or request parameters that could be used
for file-related operations?
• URL Encoding (Web only)
– %2f  /
– %2e%2e%2f  ../
• Test Examples
– http://infosec2.blogspot.com/DT.php?file=../../../../etc/passwd%00
– http://JadWebApp.com/DT.php?dir=..%2f..%2fetc%2fpasswd
– symlink / rootfs  SMB
Directory Traversal– Vulnerable Code
<?php
if ($_GET['file'])
$file = $_GET['file'];
include('/var/www/'.$file);
?>
Directory Traversal Countermeasures
• Developers
– Try not to use user input in file system calls
– Perform path canonicalization (symlinks, . & .. are
resolved)
– Properly configure services
Buffer Overflow
#define: Buffer Overflows occur when a program attempts
to write data that exceeds the capacity of a fixed length
buffer, and consequently, overwrites adjacent memory.
Stack Based Buffer Overflow (x86)
Testing for Buffer Overflows
• Testing for overflows
– Dynamic Analysis
– Static Analysis
Buffer Overflow – Vulnerable Code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char * argv[]){
char argument[42];
if (argc < 2){
printf("n[!!!] Please supply a program argument. [!!!]nn");
exit(0);
}
printf("n[*] Gimppy's BOF code examplen");
strcpy(argument, argv[1]);
printf("[*] You supplied '%s' as your argument!n", argument);
printf("[*] Program Completed. n");
return 0;
}
Buffer Overflow Countermeasures
• Developers
– Don’t use unsafe functions
– Perform bounds checking
– Compile/Link with overflow prevention techniques
• Canary/Stack Cookie
– gcc –fstack-protector
• ASLR
– gcc –fPIE || ld -pie
• DEP/NX
– gcc marks the stack non-executable by default
Buffalo TeraStation: Hacking Files
• Missing function-level
access control
• Susceptible to
command injection
• p0wned
YIKES! What Can We Do?
• Consumers
– Protect your security & privacy! Harden your
networked devices!
– Demand that vendors put more emphasis into
securing SOHO networking equipment.
• Vendors
– Consider and integrate security into your product
design
– Abide by the principal of least privilege
– Follow coding best practices
– Patch management
Q & A
Thanks for your time!
Paul Dant
Chief Strategist @ ISE
pdant@securityevaluators.com

More Related Content

What's hot

openioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensicsopenioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensicsTakahiro Haruyama
 
CNIT 126: Ch 2 & 3
CNIT 126: Ch 2 & 3CNIT 126: Ch 2 & 3
CNIT 126: Ch 2 & 3Sam Bowne
 
I Know You Want Me - Unplugging PlugX
I Know You Want Me - Unplugging PlugXI Know You Want Me - Unplugging PlugX
I Know You Want Me - Unplugging PlugXTakahiro Haruyama
 
Ch 4: Footprinting and Social Engineering
Ch 4: Footprinting and Social EngineeringCh 4: Footprinting and Social Engineering
Ch 4: Footprinting and Social EngineeringSam Bowne
 
Ch 7: Programming for Security Professionals
Ch 7: Programming for Security ProfessionalsCh 7: Programming for Security Professionals
Ch 7: Programming for Security ProfessionalsSam Bowne
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware AnalysisAndrew McNicol
 
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)Sam Bowne
 
REMnux Tutorial-3: Investigation of Malicious PDF & Doc documents
REMnux Tutorial-3: Investigation of Malicious PDF & Doc documentsREMnux Tutorial-3: Investigation of Malicious PDF & Doc documents
REMnux Tutorial-3: Investigation of Malicious PDF & Doc documentsRhydham Joshi
 
Anomalies Detection: Windows OS - Part 1
Anomalies Detection: Windows OS - Part 1Anomalies Detection: Windows OS - Part 1
Anomalies Detection: Windows OS - Part 1Rhydham Joshi
 
CNIT 127: 8: Windows overflows (Part 2)
CNIT 127: 8: Windows overflows (Part 2)CNIT 127: 8: Windows overflows (Part 2)
CNIT 127: 8: Windows overflows (Part 2)Sam Bowne
 
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgCNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgSam Bowne
 
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsSam Bowne
 
Malicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic SoftwareMalicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic SoftwareTakahiro Haruyama
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Sam Bowne
 
Fast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility PluginFast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility PluginTakahiro Haruyama
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Sam Bowne
 
avar2015_ddos_trojans_slides
avar2015_ddos_trojans_slidesavar2015_ddos_trojans_slides
avar2015_ddos_trojans_slidesJaromir Horejsi
 
Remnux tutorial-1 Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1  Statically Analyse Portable Executable(PE) FilesRemnux tutorial-1  Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1 Statically Analyse Portable Executable(PE) FilesRhydham Joshi
 

What's hot (20)

Winnti Polymorphism
Winnti PolymorphismWinnti Polymorphism
Winnti Polymorphism
 
openioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensicsopenioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensics
 
CNIT 126: Ch 2 & 3
CNIT 126: Ch 2 & 3CNIT 126: Ch 2 & 3
CNIT 126: Ch 2 & 3
 
I Know You Want Me - Unplugging PlugX
I Know You Want Me - Unplugging PlugXI Know You Want Me - Unplugging PlugX
I Know You Want Me - Unplugging PlugX
 
Ch 4: Footprinting and Social Engineering
Ch 4: Footprinting and Social EngineeringCh 4: Footprinting and Social Engineering
Ch 4: Footprinting and Social Engineering
 
Ch 7: Programming for Security Professionals
Ch 7: Programming for Security ProfessionalsCh 7: Programming for Security Professionals
Ch 7: Programming for Security Professionals
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
 
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
 
REMnux Tutorial-3: Investigation of Malicious PDF & Doc documents
REMnux Tutorial-3: Investigation of Malicious PDF & Doc documentsREMnux Tutorial-3: Investigation of Malicious PDF & Doc documents
REMnux Tutorial-3: Investigation of Malicious PDF & Doc documents
 
Anomalies Detection: Windows OS - Part 1
Anomalies Detection: Windows OS - Part 1Anomalies Detection: Windows OS - Part 1
Anomalies Detection: Windows OS - Part 1
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
CNIT 127: 8: Windows overflows (Part 2)
CNIT 127: 8: Windows overflows (Part 2)CNIT 127: 8: Windows overflows (Part 2)
CNIT 127: 8: Windows overflows (Part 2)
 
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgCNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
 
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
 
Malicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic SoftwareMalicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic Software
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging
 
Fast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility PluginFast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility Plugin
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
 
avar2015_ddos_trojans_slides
avar2015_ddos_trojans_slidesavar2015_ddos_trojans_slides
avar2015_ddos_trojans_slides
 
Remnux tutorial-1 Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1  Statically Analyse Portable Executable(PE) FilesRemnux tutorial-1  Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1 Statically Analyse Portable Executable(PE) Files
 

Viewers also liked

Business Impact From IoT? Just Add Data Science
Business Impact From IoT? Just Add Data ScienceBusiness Impact From IoT? Just Add Data Science
Business Impact From IoT? Just Add Data ScienceVMware Tanzu
 
frog IoT Big Design IoT World Congress 2015
frog IoT Big Design IoT World Congress 2015frog IoT Big Design IoT World Congress 2015
frog IoT Big Design IoT World Congress 2015Patrick Kalaher
 
IoT and BD Introduction
IoT and BD IntroductionIoT and BD Introduction
IoT and BD IntroductionWayne Sun
 
Introduction to Radial Basis Function Networks
Introduction to Radial Basis Function NetworksIntroduction to Radial Basis Function Networks
Introduction to Radial Basis Function NetworksESCOM
 
ON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURES
ON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURESON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURES
ON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURESManisha Luthra
 
Patient Centric Cyber Monitoring with DocBox and Evolver
Patient Centric Cyber Monitoring with DocBox and EvolverPatient Centric Cyber Monitoring with DocBox and Evolver
Patient Centric Cyber Monitoring with DocBox and EvolverThe Security of Things Forum
 
Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...
Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...
Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...ClicTest
 
Smart, Secure and Efficient Data Sharing in IoT
Smart, Secure and Efficient Data Sharing in IoTSmart, Secure and Efficient Data Sharing in IoT
Smart, Secure and Efficient Data Sharing in IoTAngelo Corsaro
 
IoT Protocol ( 22 Aug 2015 )
IoT Protocol ( 22 Aug 2015 )IoT Protocol ( 22 Aug 2015 )
IoT Protocol ( 22 Aug 2015 )Adun Nanthakaew
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainMostafa G. M. Mostafa
 
Neural Networks: Support Vector machines
Neural Networks: Support Vector machinesNeural Networks: Support Vector machines
Neural Networks: Support Vector machinesMostafa G. M. Mostafa
 
Neural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's PerceptronNeural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's PerceptronMostafa G. M. Mostafa
 

Viewers also liked (20)

The Harsh Reality of Slow Movers
The Harsh Reality of Slow MoversThe Harsh Reality of Slow Movers
The Harsh Reality of Slow Movers
 
What is being exposed from IoT Devices
What is being exposed from IoT DevicesWhat is being exposed from IoT Devices
What is being exposed from IoT Devices
 
Securing the Fog
Securing the FogSecuring the Fog
Securing the Fog
 
Business Impact From IoT? Just Add Data Science
Business Impact From IoT? Just Add Data ScienceBusiness Impact From IoT? Just Add Data Science
Business Impact From IoT? Just Add Data Science
 
Senzations’15: Secure Internet of Things
Senzations’15: Secure Internet of ThingsSenzations’15: Secure Internet of Things
Senzations’15: Secure Internet of Things
 
frog IoT Big Design IoT World Congress 2015
frog IoT Big Design IoT World Congress 2015frog IoT Big Design IoT World Congress 2015
frog IoT Big Design IoT World Congress 2015
 
IoT and BD Introduction
IoT and BD IntroductionIoT and BD Introduction
IoT and BD Introduction
 
Introduction to Radial Basis Function Networks
Introduction to Radial Basis Function NetworksIntroduction to Radial Basis Function Networks
Introduction to Radial Basis Function Networks
 
ON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURES
ON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURESON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURES
ON THE SECURITY AND PRIVACY OF INTERNET OF THINGS ARCHITECTURES
 
Secure your Space: The Internet of Things
Secure your Space: The Internet of ThingsSecure your Space: The Internet of Things
Secure your Space: The Internet of Things
 
Patient Centric Cyber Monitoring with DocBox and Evolver
Patient Centric Cyber Monitoring with DocBox and EvolverPatient Centric Cyber Monitoring with DocBox and Evolver
Patient Centric Cyber Monitoring with DocBox and Evolver
 
Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...
Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...
Thought Leadership Webinar - Internet of things (IoT): The Next Cyber Securit...
 
Radial Basis Function
Radial Basis FunctionRadial Basis Function
Radial Basis Function
 
Smart, Secure and Efficient Data Sharing in IoT
Smart, Secure and Efficient Data Sharing in IoTSmart, Secure and Efficient Data Sharing in IoT
Smart, Secure and Efficient Data Sharing in IoT
 
IoT Protocol ( 22 Aug 2015 )
IoT Protocol ( 22 Aug 2015 )IoT Protocol ( 22 Aug 2015 )
IoT Protocol ( 22 Aug 2015 )
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
 
Neural Networks: Support Vector machines
Neural Networks: Support Vector machinesNeural Networks: Support Vector machines
Neural Networks: Support Vector machines
 
Neural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's PerceptronNeural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's Perceptron
 
Csc446: Pattren Recognition (LN1)
Csc446: Pattren Recognition (LN1)Csc446: Pattren Recognition (LN1)
Csc446: Pattren Recognition (LN1)
 
CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)
 

Similar to SOHOpelessly Broken

Thick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseThick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseScott Sutherland
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseNetSPI
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of themRoberto Suggi Liverani
 
Thick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptxThick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptxAnurag Srivastava
 
Applciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationBlueinfy Solutions
 
Thick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfThick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfSouvikRoy114738
 
Realities of Security in the Cloud
Realities of Security in the CloudRealities of Security in the Cloud
Realities of Security in the CloudAlert Logic
 
DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101dc612
 
Web App Security Presentation by Ryan Holland - 05-31-2017
Web App Security Presentation by Ryan Holland - 05-31-2017Web App Security Presentation by Ryan Holland - 05-31-2017
Web App Security Presentation by Ryan Holland - 05-31-2017TriNimbus
 
technical-information-gathering-slides.pdf
technical-information-gathering-slides.pdftechnical-information-gathering-slides.pdf
technical-information-gathering-slides.pdfMarceloCunha571649
 
Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingNetSPI
 
Attack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration TestingAttack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration TestingNetSPI
 
Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers: What's Working during Pentests (OWASP NYC)Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers: What's Working during Pentests (OWASP NYC)Scott Sutherland
 
Tracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingTracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingHemant Kumar
 
Security defined routing_cybergamut_v1_1
Security defined routing_cybergamut_v1_1Security defined routing_cybergamut_v1_1
Security defined routing_cybergamut_v1_1Joel W. King
 
Lares from LOW to PWNED
Lares from LOW to PWNEDLares from LOW to PWNED
Lares from LOW to PWNEDChris Gates
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeFastly
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysJoff Thyer
 

Similar to SOHOpelessly Broken (20)

Thick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseThick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash Course
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash Course
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
 
Thick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptxThick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptx
 
Applciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumeration
 
Thick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfThick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdf
 
Realities of Security in the Cloud
Realities of Security in the CloudRealities of Security in the Cloud
Realities of Security in the Cloud
 
DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101
 
Web App Security Presentation by Ryan Holland - 05-31-2017
Web App Security Presentation by Ryan Holland - 05-31-2017Web App Security Presentation by Ryan Holland - 05-31-2017
Web App Security Presentation by Ryan Holland - 05-31-2017
 
technical-information-gathering-slides.pdf
technical-information-gathering-slides.pdftechnical-information-gathering-slides.pdf
technical-information-gathering-slides.pdf
 
Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration Testing
 
Attack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration TestingAttack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration Testing
 
Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers: What's Working during Pentests (OWASP NYC)Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers: What's Working during Pentests (OWASP NYC)
 
Tracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingTracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracing
 
Security defined routing_cybergamut_v1_1
Security defined routing_cybergamut_v1_1Security defined routing_cybergamut_v1_1
Security defined routing_cybergamut_v1_1
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
Lares from LOW to PWNED
Lares from LOW to PWNEDLares from LOW to PWNED
Lares from LOW to PWNED
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edge
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad Guys
 
Meetup callback
Meetup callbackMeetup callback
Meetup callback
 

Recently uploaded

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

SOHOpelessly Broken

  • 1. S O H O p e l e s s l y B r o k e n A Hacker’s Perspective on Embedded Device Security
  • 2. Who Am I? ISE Confidential - not for distribution Paul Dant Chief Strategist @ ISE 9: First digital product 13: First legit black hat hack 17: First hacker caught 19: First legit white hat hack (p0wned a bank data processing center as part of a compliance audit)
  • 3. About ISE • We are: - Ethical Hackers - Computer Scientists • Our clients are: - Fortune 500 Enterprises - Entertainment, Security Software, Healthcare • Our perspective is: – Everything is broken! – White hat testing rules
  • 4. Why Should You Listen To Us? • 100% of network systems evaluated were vulnerable to exploitation. • Routers and storage systems are not the only embedded devices with egregious deficiencies. • These systems CAN and ARE being mass exploited.
  • 5. #SOHOpelessly Broken HACK ROUTERS AND GET PAID https://sohopelesslybroken.com DEFCON 23, DerbyCon v4.0, BSIDES DC, ToorCon We launched the first IoT Village @ DEFCON 23
  • 6. ISE Confidential | Not for Distribution ISE IoT Village DEF CON 23
  • 7. Agenda Embedded Device Security Risks Why Do We Care? Hacking Methodology Real World Examples What Can We Do? Summary and Q&A ISE Confidential | Not for Distribution
  • 8. Embedded Device Security Risks • Large attack surface • Default configurations are typically not secure at all • Assumption of security on the (wireless) LAN • Poor security design and implementation
  • 9. Why Do We Care? • Large attack surface • Insecure by default • Assumption of security on the (wireless) LAN • Poor (or missing!) security design and implementation
  • 10. Hacking Methodology • Information Gathering • Scanning and Enumeration • Gaining Access • Maintaining Access
  • 11. Information Gathering • Administration Settings – Default credentials – Management interface(s) • WLAN Settings – SSID and wireless encryption • Network Service Settings – DHCP, DNS, SNMP, UPnP, SMB, FTP, etc.
  • 12. Scanning and Enumeration • Identifying active hosts • Identifying open TCP/UDP ports • Identifying running services and versions
  • 13. Scanning and Enumeration Cont. Port Scan Banner Grab TCP: nmap –sS –Pn –sV –p T:1-65535 X.X.X.X UDP: nmap –sU –Pn –p U:1-65535 X.X.X.X Netcat: nc –nv <X.X.X.X> <port>
  • 14. Gaining Access • Service Investigation – Analyze web applications – Analyze servers (e.g., FTP, SMTP, SMB, HTTP) – Source Code Review (Static Code Analysis) – Fuzz Network Services (Dynamic Analysis)
  • 15. Analyzing Web Applications • Understand the application – Programming languages used • Server side (e.g., PHP, .NET, Python, ASP, Ruby on Rails) • Client side (e.g., JavaScript, HTML, JSON, Flash) – Protocols and APIs used (e.g., SOAP, REST) – Internet Media Type/MIME (e.g., JavaScript, HTML) • Toolz – Web proxy (i.e., Burpsuite) – Firebug (JavaScript debugger, HTML inspection) – Web Crawler
  • 16. Analyzing Web Applications Cont. Burpsuite Firebug
  • 17. Analyzing Network Servers • Authentication – Type (e.g., Password, Key Pair) – Anonymous access/Weak or no credentials – Misconfigurations (e.g., Directory listing, permissions) • Encryption – SSL/TLS? – SSH (AES, 3DES)?
  • 18. Static Code Analysis • If source code is available, GET IT! • Things to look for: – Logic flaws (e.g., authentication, authorization) – Functions not performing bounds-checking – Backdoors
  • 19. Fuzzing (Dynamic Analysis) • What happens if peculiar input is introduced? – A{-G42!BBB}}}}}}///}}}}}}+=-_-1234d`~~((.)_(.))$ – AAAAAAAAAAAAAAAAAAAAAAAAAA • Fuzzers – SPIKE: generic_send_tcp X.X.X.X 21 ftp.spk 0 0 – BED: ./bed.pl -s HTTP -t X.X.X.X -p 80 – Metasploit Framework – Python!
  • 22. Analyze Fuzzing Results • Toolz – Debugger (i.e., GDB) – System Call Tracer (i.e., strace) *Debugging ASUS RT-AC66U exploit
  • 23. Gaining Access • Reverse Engineering – System Binaries • Simple RE Toolz and Techniques – Strings – Hexdump – Grep – Open source? Perform static analysis! • Exploit Development
  • 24. Reverse Engineering Toolz and Techniques • Strings: strings –n <INT> <FILE> *TP-Link TL-1043ND Firmware
  • 25. Reverse Engineering Toolz and Techniques • Grep: grep –R <string> * *Code from the TRENDnet TEW-812DRU
  • 26. Exploit Development • Cross-Site Request Forgery • Command Injection • Missing Function Level Access Control – Authentication Bypass – Authorization Bypass • Directory Traversal • Buffer Overflow
  • 27. Cross-Site Request Forgery #define: CSRF is an attack that forces an unsuspecting victim into executing web commands that perform unwanted actions on a web application. Gimppy (Attacker) Jad (Victim) Web Application Attacker Web Server
  • 28. Testing for Cross-Site Request Forgery • Anti-CSRF Tokens? • HTTP referrer checking?
  • 29. Cross-Site Request Forgery Countermeasures • Users – Logout of web applications – Do NOT save credentials in your browser • Developers – Implement Anti-CSRF tokens AND HTTP referrer checking – Feeling ambitious? Require the user to authenticate before performing a state change
  • 30. Command Injection #define: Command Injection is a form of attack where operating system specific commands are injected into a vulnerable application for execution.
  • 31. Testing for Command Injection • Survey the application – Look for application features that could call underlying system functionality(e.g., ping, traceroute) – Source code? Static analysis! • Test Examples – ifconfig ; cat /etc/passwd  Linux – dir | ipconfig  Windows/Linux – ls /var/www/`<cmd>` or $(<cmd>)  Linux**Command substitution
  • 32. Command Injection – Vulnerable Code <?php $dig=shell_exec("dig {$_GET['Domain']}"); echo($dig); ?>
  • 33. Command Injection Countermeasures • Developers – Avoid calling shell commands when possible – If an API does not exist, sanitize user input before passing it to a function that executes system commands. • Python Example – BAD: os.system(‘ls ‘ + dir) – GOOD: os.listdir(dir)
  • 34. Missing Function Level Access Control #define: The absence of server-side authentication and authorization checks.
  • 35. Testing for Missing Function Level Access Control • Calling privileged API’s as an unprivileged user. • Accessing system resources that do not belong to the attacker. – Insecure Direct Object Reference – Direct Request/Forced Browsing
  • 36. Missing Function Level Access Controls Countermeasures • Developers – Perform server-side authentication and authorization checks.
  • 37. Directory Traversal #define: Directory Traversal is a form of attack where an attacker can access files and directories outside of the intended directory.
  • 38. Testing for Directory Traversal • Enumerate the application – Are there commands or request parameters that could be used for file-related operations? • URL Encoding (Web only) – %2f  / – %2e%2e%2f  ../ • Test Examples – http://infosec2.blogspot.com/DT.php?file=../../../../etc/passwd%00 – http://JadWebApp.com/DT.php?dir=..%2f..%2fetc%2fpasswd – symlink / rootfs  SMB
  • 39. Directory Traversal– Vulnerable Code <?php if ($_GET['file']) $file = $_GET['file']; include('/var/www/'.$file); ?>
  • 40. Directory Traversal Countermeasures • Developers – Try not to use user input in file system calls – Perform path canonicalization (symlinks, . & .. are resolved) – Properly configure services
  • 41. Buffer Overflow #define: Buffer Overflows occur when a program attempts to write data that exceeds the capacity of a fixed length buffer, and consequently, overwrites adjacent memory. Stack Based Buffer Overflow (x86)
  • 42. Testing for Buffer Overflows • Testing for overflows – Dynamic Analysis – Static Analysis
  • 43. Buffer Overflow – Vulnerable Code #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char * argv[]){ char argument[42]; if (argc < 2){ printf("n[!!!] Please supply a program argument. [!!!]nn"); exit(0); } printf("n[*] Gimppy's BOF code examplen"); strcpy(argument, argv[1]); printf("[*] You supplied '%s' as your argument!n", argument); printf("[*] Program Completed. n"); return 0; }
  • 44. Buffer Overflow Countermeasures • Developers – Don’t use unsafe functions – Perform bounds checking – Compile/Link with overflow prevention techniques • Canary/Stack Cookie – gcc –fstack-protector • ASLR – gcc –fPIE || ld -pie • DEP/NX – gcc marks the stack non-executable by default
  • 45. Buffalo TeraStation: Hacking Files • Missing function-level access control • Susceptible to command injection • p0wned
  • 46. YIKES! What Can We Do? • Consumers – Protect your security & privacy! Harden your networked devices! – Demand that vendors put more emphasis into securing SOHO networking equipment. • Vendors – Consider and integrate security into your product design – Abide by the principal of least privilege – Follow coding best practices – Patch management
  • 47. Q & A Thanks for your time! Paul Dant Chief Strategist @ ISE pdant@securityevaluators.com