SlideShare a Scribd company logo
Defcon Moscow #0x0A - Mikhail Firstov "Hacking routers as Web Hacker"
Hacking routers
as
Web Hacker
WHOAMI
• Researcher @ hlsec.ru
• @cyberpunkych
• Attacking MongoDB @ ZN2012
• Database honeypot by design @ Defcon Russia
• Meme Master
Routers everywhere.
• Home
• Work
• Hospitals
• Banks
• In your bag
• etc
But I’m web hacker, what can I do?
• Router’s web control panel == web site
• Connect managers with web interface, such as Yota Access
• ISP (statistics, billing, management, etc)
Routerzzz
OWASP TOP 10 for routers
• Default credentials
• Auth bypass
• XSS
• CSRF
• Command Injection
• Sensitive info leak
• Bugs in third party libraries
• RCE, XXE, etc
Default credentials
Should I say anything?
Authentication Bypass/No Auth
• Hello, Yota Many
• Hello, D-Link’s backdoor
• Hello, MTS 4G Router
• Hello, others
(DIR-100, DI-524, DI-604, etc)
CSRF/XSS everywhere
Srlsy, it’s everywhere. But why?
Because **** you, that’s why.
(Zyxel Keenetic v1)
Command injection
Always check network tools
(ASUS RT-N10P)
Sensitive info leak
• /error_page.htm
• /DevInfo.php
• /rom-0
(ASUS RT-N12D1)
Bugs in third party libraries
• Heartbleed
• ShellShock
• RomPager
• etc
Hacking algorithm
WARNINNG!
ВАС ПРИСТРЕЛЯТ ПО УТРУ – НЕ РАБОТАЙТЕ ПО РУ!
1. Get the firmware
• Сheck vendor web site/ftp
• Get firmware source code (GPL profits)
• No firmware at all? Dump it via UART/SPI/JTAG (HW mode on)
2. Unpack it
• Binwalk -> search for signature and try to unpack
• Firmware-mod-kit pack/unpack
• If NO_SUCCESS -> analyze firmware entropy
• Sasquatch for squashfs, other fs -> google for tools
3. CHECK AUTH
• Black Box => White Box
• for i in *; do curl http://router_ip/$i; done
• You know what to do ;)
4. СHECK CMD INJECTION
• PING -> ya.ru;ls
• CONFIG backup to FTP/TFTP
• Any place where command execution is used
• Check all shell symbols
• Error-based command injection for output
# ping ya.ru || ls
# ping $(uname)
# ping `uname`
# ping ya.ru && ls
# ping ya.ru; ls
# ping $USER.ya.ru
...
5. Check for XSS
• <script>alert(1)</script> for every param!
• Check hostname, sometimes it can help you
• Even 1 XSS => PROFIT!!1
• Stored XSS => Compromised web interface
5. Check for XSS
• <script>alert(1)</script> for every param!
• Check hostname, sometimes it can help you
• Even 1 XSS => PROFIT!!1
• Stored XSS => Compromised web interface
Typical attack scheme:
Link/Page with XSS => AJAX => getElementsByTagName(‘input’)[*].value => log data
Hide myself from web aka rookit hostname
Hello, 1'}]"); !
Hide’n’seek from browser via xss in Zyxel Keenetic.
6. Check for CSRF
• Inspect for anti-csrf tokens
• Check X-Requested-With
• Referer check
6. Check for CSRF
• Inspect for anti-csrf tokens
• Check X-Requested-With
• Referer check
Referer checking:
6. Check for CSRF
• Inspect for anti-csrf tokens
• Check X-Requested-With
• Referer check
Any other == bad referer:
6. Check for CSRF
• Inspect for anti-csrf tokens
• Check X-Requested-With
• Referer check
Open Redirect trick to bypass regexp:
CSRF => MITM
All you need is love CSRF via updating DNS settings!
( <img src=“csrf”>, habrahabr, you know. )
XSS + Smart CSRF
1. Get the internal IP address using a nice WebRTC hack
2. Get router IP (no so many requests 8) )
3. Make CSRF Request via XSS payload (better for stored XSS)
4. Get all data (sometimes passwords stored in input.value’s)
5. Redirect to page with XSS
6. ???
7. All your data are belong to us!
Support Software
Support Software
• %operator_name% Connect (Huawei modems), Yota Access, etc
• Sometimes they also use web inside apps!
• Binary bugs (BOF, etc)
• Bugs with bad privileges
• Sniff requests to ISP => new bugs
Support Software
From CSRF to RCE!
video_here
ISP
ISP – Just another target
• Google/Yandex dork
• Cabinet/Balance/etc on provider’s site
• Subdomains
• Popular services
Why it is important?
• Update server control
• Client-side tricks (crossdomain.xml)
• Remote device administration
• New default credentials
• Attack firmware developers
Google it!
Just google.
WARNINNG! WARNINNG! WARNINNG!
Example from real life
Conclusion
• Router == web site
• Black Box => White Box
• XSS/CSRF everywhere
• Vuln1+vuln2->vuln3
• The RCE is out there
• R.E.S.H.E.T.O.
Any questions?
INFO:
@cyberpunkych
Links:
http://www.routerpwn.com
http://routersecurity.org
http://seclists.org
http://dsec.ru/upload/medialibrary/589/589327eb24
133e5c615fa11950340e05.pdf
http://goo.gl/0P2rgl
https://github.com/devttys0/sasquatch
https://github.com/0x90/kali-
scripts/blob/master/embedded.sh
https://goo.gl/x3XjLU
Thnx:
@090h
@n3tw0rk_

More Related Content

PPTX
Иван Новиков «Elastic search»
Mail.ru Group
 
PPTX
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...
Mail.ru Group
 
PPTX
Defcon Moscow #0x0A - Oleg Kupreev "Uncommon MiTM in uncommon conditions"
Defcon Moscow
 
PDF
Stealth post-exploitation with phpsploit
Nullbyte Security Conference
 
PPTX
如何利用 Docker 強化網站安全
Tim Hsu
 
PDF
Talk NullByteCon 2015
Roberto Soares
 
PPTX
Буткит через СМС: оценка безопасности сети 4G
Positive Hack Days
 
PPT
Denis Baranov: Root via XSS
qqlan
 
Иван Новиков «Elastic search»
Mail.ru Group
 
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...
Mail.ru Group
 
Defcon Moscow #0x0A - Oleg Kupreev "Uncommon MiTM in uncommon conditions"
Defcon Moscow
 
Stealth post-exploitation with phpsploit
Nullbyte Security Conference
 
如何利用 Docker 強化網站安全
Tim Hsu
 
Talk NullByteCon 2015
Roberto Soares
 
Буткит через СМС: оценка безопасности сети 4G
Positive Hack Days
 
Denis Baranov: Root via XSS
qqlan
 

What's hot (20)

PDF
Is rust language really safe?
Nullbyte Security Conference
 
PDF
MIPS-X
Zoltan Balazs
 
ODP
Securing the network for VMs or Containers
Marian Marinov
 
PDF
44CON London 2015 - Is there an EFI monster inside your apple?
44CON
 
PPTX
Security Onion Conference - 2016
DefensiveDepth
 
PDF
Aide 2014 - Fundamentals of Linux Privilege Escalation
nullthreat
 
PDF
How to Connect MQTT Broker on ESP8266 WiFi
Naoto MATSUMOTO
 
PPTX
Security in PHP - 那些在滲透測試的小技巧
Orange Tsai
 
PDF
Null bhopal Sep 2016: What it Takes to Secure a Web Application
Anant Shrivastava
 
PPTX
EKFiddle: a framework to study Exploit Kits
Jerome Segura
 
PDF
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions
Zoltan Balazs
 
PDF
Kali tools list with short description
Jose Moruno Cadima
 
PDF
Linux advanced privilege escalation
Jameel Nabbo
 
PPTX
Telehack: May the Command Line Live Forever
Gregory Hanis
 
PPTX
Metasploit for Web Workshop
Dennis Maldonado
 
PDF
From P0W3R to SH3LL
Arthur Paixão
 
PDF
44CON London 2015 - Jtagsploitation: 5 wires, 5 ways to root
44CON
 
PDF
44CON 2014 - Breaking AV Software
44CON
 
PDF
2015.10.05 Updated > Network Device Development - Part 2: Firewall 101
Cheng-Yi Yu
 
PDF
Is Rust Programming ready for embedded development?
Knoldus Inc.
 
Is rust language really safe?
Nullbyte Security Conference
 
Securing the network for VMs or Containers
Marian Marinov
 
44CON London 2015 - Is there an EFI monster inside your apple?
44CON
 
Security Onion Conference - 2016
DefensiveDepth
 
Aide 2014 - Fundamentals of Linux Privilege Escalation
nullthreat
 
How to Connect MQTT Broker on ESP8266 WiFi
Naoto MATSUMOTO
 
Security in PHP - 那些在滲透測試的小技巧
Orange Tsai
 
Null bhopal Sep 2016: What it Takes to Secure a Web Application
Anant Shrivastava
 
EKFiddle: a framework to study Exploit Kits
Jerome Segura
 
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions
Zoltan Balazs
 
Kali tools list with short description
Jose Moruno Cadima
 
Linux advanced privilege escalation
Jameel Nabbo
 
Telehack: May the Command Line Live Forever
Gregory Hanis
 
Metasploit for Web Workshop
Dennis Maldonado
 
From P0W3R to SH3LL
Arthur Paixão
 
44CON London 2015 - Jtagsploitation: 5 wires, 5 ways to root
44CON
 
44CON 2014 - Breaking AV Software
44CON
 
2015.10.05 Updated > Network Device Development - Part 2: Firewall 101
Cheng-Yi Yu
 
Is Rust Programming ready for embedded development?
Knoldus Inc.
 

Similar to Defcon Moscow #0x0A - Mikhail Firstov "Hacking routers as Web Hacker" (20)

PPTX
Hacking routers as Web Hacker
HeadLightSecurity
 
PDF
Embedded systems
Katy Anton
 
PPTX
CONFidence 2015: The Top 10 Web Hacks of 2014 - Matt Johansen, Johnathan Kuskos
PROIDEA
 
PPTX
[2.1] Web application Security Trends - Omar Ganiev
OWASP Russia
 
PPTX
Owasp web application security trends
beched
 
KEY
DVWA BruCON Workshop
testuser1223
 
PDF
Burp suite
Yashar Shahinzadeh
 
PDF
HTTP For the Good or the Bad - FSEC Edition
Xavier Mertens
 
PPTX
Soho routers: swords and shields CyberCamp 2015
Iván Sanz de Castro
 
PDF
They Ought to Know Better: Exploiting Security Gateways via Their Web Interfaces
michelemanzotti
 
PDF
Cracking into embedded devices and beyond
amiable_indian
 
PDF
DrupalCamp London 2017 - Web site insecurity
George Boobyer
 
PDF
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
bugcrowd
 
PDF
DEFCON 23 - Jason Haddix - how do i shot web
Felipe Prado
 
PPTX
Hacking WebApps for fun and profit : how to approach a target?
Yassine Aboukir
 
PPTX
Top 10 Web Hacks 2012
Matt Johansen
 
PPTX
Top Ten Web Hacking Techniques of 2012
Jeremiah Grossman
 
PDF
Web Security - Introduction v.1.3
Oles Seheda
 
PDF
Web Security - Introduction
SQALab
 
PDF
2010: A Web Hacking Odyssey - Top Ten Hacks of the Year
Jeremiah Grossman
 
Hacking routers as Web Hacker
HeadLightSecurity
 
Embedded systems
Katy Anton
 
CONFidence 2015: The Top 10 Web Hacks of 2014 - Matt Johansen, Johnathan Kuskos
PROIDEA
 
[2.1] Web application Security Trends - Omar Ganiev
OWASP Russia
 
Owasp web application security trends
beched
 
DVWA BruCON Workshop
testuser1223
 
Burp suite
Yashar Shahinzadeh
 
HTTP For the Good or the Bad - FSEC Edition
Xavier Mertens
 
Soho routers: swords and shields CyberCamp 2015
Iván Sanz de Castro
 
They Ought to Know Better: Exploiting Security Gateways via Their Web Interfaces
michelemanzotti
 
Cracking into embedded devices and beyond
amiable_indian
 
DrupalCamp London 2017 - Web site insecurity
George Boobyer
 
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
bugcrowd
 
DEFCON 23 - Jason Haddix - how do i shot web
Felipe Prado
 
Hacking WebApps for fun and profit : how to approach a target?
Yassine Aboukir
 
Top 10 Web Hacks 2012
Matt Johansen
 
Top Ten Web Hacking Techniques of 2012
Jeremiah Grossman
 
Web Security - Introduction v.1.3
Oles Seheda
 
Web Security - Introduction
SQALab
 
2010: A Web Hacking Odyssey - Top Ten Hacks of the Year
Jeremiah Grossman
 

More from Defcon Moscow (12)

PDF
Defcon Moscow #0x0A - Dmitry Nedospasov "WTFPGA?!"
Defcon Moscow
 
PPTX
Defcon Moscow #0x0A - Nikita Kislitsin APT "Advanced Persistent Threats"
Defcon Moscow
 
PDF
Defcon Moscow #0x0A - Sergey Golovanov "Вредоносные программы для финансовых ...
Defcon Moscow
 
PPT
Defcon Moscow #0x0A - Dmitry Evteev "Pentest vs. APT"
Defcon Moscow
 
PPTX
Defcon Moscow #9 - Oleg Kupreev "Telecommunication Hardware Vulnerabilities"
Defcon Moscow
 
PDF
Defcon Moscow #9 - Mikhail Elizarov "MITM"
Defcon Moscow
 
PPTX
Defcon Moscow #9 - Timur Yunusov "Особенности проведения социотехнического те...
Defcon Moscow
 
PPTX
Defcon Moscow #9 - Ivan Novikov "ElasticSearch is secure?"
Defcon Moscow
 
PDF
Defcon Moscow #9 - Sergey Vishnyakov
Defcon Moscow
 
PPT
Denis Makrushin & Maria Garnaeva - DeanonymizaTOR
Defcon Moscow
 
PPT
Goltsev Yuriy - Ломать - не строить!
Defcon Moscow
 
PPT
Oleg Kupreev - 802.11 tricks and threats
Defcon Moscow
 
Defcon Moscow #0x0A - Dmitry Nedospasov "WTFPGA?!"
Defcon Moscow
 
Defcon Moscow #0x0A - Nikita Kislitsin APT "Advanced Persistent Threats"
Defcon Moscow
 
Defcon Moscow #0x0A - Sergey Golovanov "Вредоносные программы для финансовых ...
Defcon Moscow
 
Defcon Moscow #0x0A - Dmitry Evteev "Pentest vs. APT"
Defcon Moscow
 
Defcon Moscow #9 - Oleg Kupreev "Telecommunication Hardware Vulnerabilities"
Defcon Moscow
 
Defcon Moscow #9 - Mikhail Elizarov "MITM"
Defcon Moscow
 
Defcon Moscow #9 - Timur Yunusov "Особенности проведения социотехнического те...
Defcon Moscow
 
Defcon Moscow #9 - Ivan Novikov "ElasticSearch is secure?"
Defcon Moscow
 
Defcon Moscow #9 - Sergey Vishnyakov
Defcon Moscow
 
Denis Makrushin & Maria Garnaeva - DeanonymizaTOR
Defcon Moscow
 
Goltsev Yuriy - Ломать - не строить!
Defcon Moscow
 
Oleg Kupreev - 802.11 tricks and threats
Defcon Moscow
 

Recently uploaded (20)

PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Software Development Methodologies in 2025
KodekX
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
The Future of Artificial Intelligence (AI)
Mukul
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 

Defcon Moscow #0x0A - Mikhail Firstov "Hacking routers as Web Hacker"