SlideShare a Scribd company logo
qrator.net 2015
BREAKING HTTPS

WITH BGP HIJACKING
Artyom Gavrichenkov
Qrator Labs
ag@qrator.net
qrator.net 2015
BGP Hijacking at a glance
•  In the Internet, routing announcements are accepted without
almost any validation
•  This opens a possibility for a network operator to announce
someone else’s network prefixes without permission
qrator.net 2015
BGP Hijacking, a problem
•  In the Internet, routing announcements are accepted without
almost any validation
•  This opens a possibility for a network operator to announce
someone else’s network prefixes without permission
•  The prefix may be announced with the same origin
•  The prefix may be leaked
•  A malicious operator can steal prefixes and blackhole them or intercept and
modify traffic in transit
•  A good operator can also steal someone’s network occasionally, by an error
qrator.net 2015
BGP Hijacking, a problem
•  In the Internet, routing announcements are accepted without
almost any validation
•  This opens a possibility for a network operator to announce
someone else’s network prefixes without permission
•  The prefix may be announced with the same origin
•  The prefix may be leaked
•  A malicious operator can steal prefixes and blackhole them or intercept and
modify traffic in transit
•  A good operator can also steal someone’s network occasionally, by an error
•  A malicious employee of a good operator is then able to read and modify incoming
traffic as well
qrator.net 2015
BGP Hijacking, a problem
•  In the Internet, routing announcements are accepted without
almost any validation
•  This opens a possibility for a network operator to announce
someone else’s network prefixes without permission
•  The prefix may be announced with the same origin
•  The prefix may be leaked
•  A malicious operator can steal prefixes and blackhole them or intercept and
modify traffic in transit
•  A good operator can also steal someone’s network occasionally, by an error
•  A malicious employee of a good operator is then able to read and modify incoming
traffic as well
•  Unauthorized access to operator’s equipment can also be used for hijacking
qrator.net 2015
BGP Hijacking, a problem
•  ~30000 IPv4 prefixes leaked during last 2 weeks
•  ~5000 of them in US
•  ~2000 in Australia (far from US)
•  ~5000 IPv4 prefixes leaking right now
•  Almost all this is likely to be caused just by human
missteps
qrator.net 2015
BGP Hijacking, a problem
•  ~30000 IPv4 prefixes leaked during last 2 weeks
•  ~5000 of them in US
•  ~2000 in Australia (far from US)
•  ~5000 IPv4 prefixes leaking right now
•  Almost all this is likely to be caused just by human
missteps
•  Why attackers don’t steal prefixes?
qrator.net 2015
Detection of a hijacking
•  Bogus AS Path at Routeviews or some providers’ looking
glasses
•  Change in TTL
•  Increased RTT
qrator.net 2015
Detection of a hijacking: hardly possible
•  Bogus AS Path at Routeviews or some providers’ looking
glasses
– hard to discover without an advanced monitoring system
•  Change in TTL
– easy for a MitM to hide
•  Increased RTT
qrator.net 2015
“Global Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/23 to its upstream AS B.
3.  ?
qrator.net 2015
“Global Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/23 to its upstream AS B.
3.  More specific route wins the battle (except IXs, where it may
lose), and all traffic to X.Y.Z.1 starts to flow into AS M via AS
B.
4.  All users of X.Y.Z.1 immediately notice increased latency.
5.  A bell rings, AS A and AS B figure out the problem and solve it
somehow together during next 4-5 business days
qrator.net 2015
Detection of a hijacking: hardly possible
•  Bogus AS Path at Routeviews or some providers’ looking
glasses
– hard to discover without an advanced monitoring system
•  Change in TTL
– easy for a MitM to hide
•  Increased RTT
qrator.net 2015
Detection of a hijacking: hardly possible
•  Bogus AS Path at Routeviews or some providers’ looking
glasses
– hard to discover without an advanced monitoring system
•  Change in TTL
– easy for a MitM to hide
•  Increased RTT
– between what?
qrator.net 2015
“Local Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B.
3.  ??
qrator.net 2015
“Local Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B.
3.  It depends on the relations between B and C
•  If B is C’s customer:
•  B will prefer the route originating from M
•  C will prefer the route originating from A or B(M)
qrator.net 2015
“Local Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B.
3.  It depends on the relations between B and C
•  If B is C’s customer:
•  B will prefer the route originating from M
•  C will prefer the route originating from A or B(M)
=> A global hijacking
is possible
qrator.net 2015
“Local Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B.
3.  It depends on the relations between B and C
•  If B is C’s customer:
•  B will prefer the route originating from M
•  C will prefer the route originating from A or B(M)
•  If B is C’s provider:
•  C will prefer the route originating from A
•  B will prefer the route originating from C(A) or M
=> A global hijacking
is possible
qrator.net 2015
“Local Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B.
3.  It depends on the relations between B and C
•  If B is C’s customer:
•  B will prefer the route originating from M
•  C will prefer the route originating from A or B(M)
•  If B is C’s provider:
•  C will prefer the route originating from A
•  B will prefer the route originating from C(A) or M
=> A global hijacking
is possible
=> Hijacking is
local to B
(at best)
qrator.net 2015
That was an easy part.
qrator.net 2015
“Local Hijacking”
1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its
upstream AS C
2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B.
3.  What happens in B and C, depends on the relations between
B and C
4.  What if B and C aren’t directly connected?
Things get more complicated in other AS all over the world
qrator.net 2015
“Local Hijacking”
•  Things get more complicated in other AS all over the
world
•  It is possible to steal a prefix “locally” – in a part of the
Internet, perfectly isolated by inter-AS relations
•  In fact, that’s why BGP Anycast works
•  RTT will not increase significantly, so no one will notice
•  Looking glasses of major network operators will show valid
announces
qrator.net 2015
“Local Hijacking”
•  Things get more complicated in other AS all over the
world
•  It is possible to steal a prefix “locally” – in a part of the
Internet, perfectly isolated by inter-AS relations
•  In fact, that’s why BGP Anycast works
•  RTT will not increase significantly, so no one will notice
•  Looking glasses of major network operators will show valid
announces
•  But why would we need that?
qrator.net 2015
Obtaining a TLS certificate from CA
•  The procedure is generally as follows:
1.  An account is created at the Web site of a certificate authority
2.  A CSR is created and uploaded
3.  CA offers plenty of options to verify domain ownership:
•  WHOIS records
•  A specific HTML page under a specific URL
•  Custom token in DNS TXT Record
•  …
4.  After the ownership is verified, you get your signed TLS
certificate for your money (or sometimes for free)
qrator.net 2015
Stealing a valid TLS certificate, pt. 1
Prerequisite: you need to find a CA close to your AS in
topological sense
1.  A prefix hosting an IP for the victim’s Web site
is hijacked locally, so that the following conditions apply:
•  At this time victim’s AS should notice nothing
•  The chosen CA’s traffic is routed to the hijacker
2.  Go on: register with the chosen CA, upload a CSR,
get an HTML page, upload HTML to your own server,
pay and obtain the signed certificate
qrator.net 2015
Stealing a valid TLS certificate, pt. 2
Prerequisite: you need to find a CA close to your AS in
topological sense
1.  A prefix hosting an authoritative DNS for the victim’s Web site
is hijacked locally, so that the following conditions apply:
•  At this time victim’s AS should notice nothing
•  The chosen CA’s traffic is routed to the hijacker
2.  Go on: register with the chosen CA, upload a CSR,
get a token, set up DNS TXT on your own server,
pay and obtain the signed certificate
qrator.net 2015
Stealing a valid TLS certificate, pt. 3
Prerequisite: you need to find a CA close to your AS in
topological sense
1.  A prefix hosting a WHOIS server for the victim’s domain
registrar is hijacked locally, so that the following conditions
apply:
•  At this time victim’s AS should notice nothing
•  The chosen CA’s traffic is routed to the hijacker
2.  …
qrator.net 2015
Stealing a valid TLS certificate
•  The hijack is local: victim’s AS should notice nothing or almost
nothing
– Haha, some guy in Kerbleckistan experiences problems connecting to our site!
•  However, the resulting TLS certificate is perfectly global:
Kerbleckistanian CA is not that worse than GoDaddy or Comodo,
the certificate would be valid anywhere
•  The resulting TLS certificate can be used for MitM attacks
anywhere in the world
qrator.net 2015
Certificate Authority Hijacking
Vice versa:
•  We can steal victim’s prefix near selected CA’s AS
•  We can steal CA’s prefix near victim’s AS as well
•  The implementation is just a bit more complex
qrator.net 2015
Stealing a valid TLS certificate
•  It’s not very hard to do a local hijacking. You only need this:
•  A border router under your control
•  Information about your BGP peers: their customers, providers,
peerings.
This is not a top secret: http://radar.qrator.net/ figures out this
information on a hourly basis, using public data only: traceroute,
AS Paths, etc.
•  That’s all
qrator.net 2015
Mitigating the problem.
qrator.net 2015
Mitigating the problem.
…yuck.
qrator.net 2015
Mitigating the problem.
…yuck.
•  There’s obviously a problem with current SSL/TLS PKI
•  But that’s not something we can fix tomorrow
•  There’s obviously a problem with Internet routing
•  But that’s not something we can fix in a decade
qrator.net 2015
Mitigating the problem.
•  We have to stick to workarounds:
•  BGP monitoring, able to detect hijacking in Kerbleckistan
•  http://radar.qrator.net/ (it’s free, by the way)
•  http://research.dyn.com/
•  http://www.bgpmon.net/
•  Watch your prefixes!
•  RFC 7469 [draft]
•  Browser plug-ins restricting certificate updates (Certificate Patrol
etc.)
•  DANE?
•  …
qrator.net 2015
Mitigating the problem.
•  We have to stick to workarounds:
•  Browser plug-ins restricting certificate updates (Certificate Patrol
etc.)
qrator.net 2015
Mitigating the problem
•  There’s obviously a problem with current SSL/TLS PKI
•  There’s obviously a problem with Internet routing
•  Maybe it’s high time to discuss and fix those problems
qrator.net 2015
Black Hat Sound Bytes
•  There are flaws in Internet routing and in TLS PKI
concept. There are also corresponding risks
•  Those risks could be mitigated. However, the better PKI
design will help to do it easier
•  BGP monitoring systems are really useful! If you are in
charge of network security in a large ISP, please start
using them right away
Thank you!
mailto: Artyom Gavrichenkov <ag@qrator.net>

More Related Content

PDF
Four years of breaking HTTPS with BGP hijacking
PDF
DDoS Attacks in 2017: Beyond Packet Filtering
PDF
Black hat usa_2015-bypass_surgery-6_aug2015
PDF
White Paper. Эволюция DDoS-атак и средств противодействия данной угрозе
PDF
Internet Roads of Caucasus
PPTX
DDoS-атаки в россии: 2015
PDF
Как подготовиться к гигабитной DDoS-атаке при помощи машинного обучения
PDF
DDoS Defence 101
Four years of breaking HTTPS with BGP hijacking
DDoS Attacks in 2017: Beyond Packet Filtering
Black hat usa_2015-bypass_surgery-6_aug2015
White Paper. Эволюция DDoS-атак и средств противодействия данной угрозе
Internet Roads of Caucasus
DDoS-атаки в россии: 2015
Как подготовиться к гигабитной DDoS-атаке при помощи машинного обучения
DDoS Defence 101

Viewers also liked (13)

PDF
Финансовый сектор. Аспекты информационной безопасности 2016
PDF
Latency i pv4 vs ipv6
PDF
DDoS-­атаки: почему они возможны, и как их предотвращать
PDF
Сетевая диагностика: новый взгляд сквозь старые щели
PDF
DDoS-атаки вчера, сегодня, завтра
PDF
DDoS как актуальная проблема безопасности
PPTX
Traffic anomaly detection and attack
PDF
Особенности использования машинного обучения при защите от DDoS-атак
PDF
A Simple BGP
PPTX
Масштабируя TLS
PDF
ISP Border Definition
PDF
Сколько стоит доступ в память, и что с этим делать
PDF
Анализ количества посетителей на сайте [Считаем уникальные элементы]
Финансовый сектор. Аспекты информационной безопасности 2016
Latency i pv4 vs ipv6
DDoS-­атаки: почему они возможны, и как их предотвращать
Сетевая диагностика: новый взгляд сквозь старые щели
DDoS-атаки вчера, сегодня, завтра
DDoS как актуальная проблема безопасности
Traffic anomaly detection and attack
Особенности использования машинного обучения при защите от DDoS-атак
A Simple BGP
Масштабируя TLS
ISP Border Definition
Сколько стоит доступ в память, и что с этим делать
Анализ количества посетителей на сайте [Считаем уникальные элементы]
Ad

Similar to BREAKING HTTPS WITH BGP HIJACKING (20)

PDF
BGP Flexibility and its Consequences.
PDF
BGP Flexibility and Its Consequences
PDF
Routing Security
PDF
Артем Гавриченков "The Dark Side of Things: Distributed Denial of Service Att...
PDF
NZNOG 2022: Routing Security
PPTX
Масштабируя TLS / Артём Гавриченков (Qrator Labs)
PDF
btNOG 6: Securing Internet Routing
PDF
PacNOG 29: Routing security is more than RPKI
PPTX
Resource Public Key Infrastructure - A Step Towards a More Secure Internet Ro...
PDF
DDoS Attacks - Scenery, Evolution and Mitigation
PDF
MMIX Peering Forum: Securing Internet Routing
PDF
RPKI Deployment Status in Bangladesh
PDF
BKNIX Peering Forum 2019: Securing Internet Routing
PPTX
An Evolving Era of Botnet Empires @ BSides Las Vegas
PPTX
I See You
PPTX
32nd TWNIC IP OPM: ROA+ROV deployment & industry development
PPT
Kerberos
PPTX
Mitm(man in the middle) ssl proxy attacks
PPT
Authenticated Identites in VoIP Call Control
PPT
Presentation To Vo Ip Round Table V2
BGP Flexibility and its Consequences.
BGP Flexibility and Its Consequences
Routing Security
Артем Гавриченков "The Dark Side of Things: Distributed Denial of Service Att...
NZNOG 2022: Routing Security
Масштабируя TLS / Артём Гавриченков (Qrator Labs)
btNOG 6: Securing Internet Routing
PacNOG 29: Routing security is more than RPKI
Resource Public Key Infrastructure - A Step Towards a More Secure Internet Ro...
DDoS Attacks - Scenery, Evolution and Mitigation
MMIX Peering Forum: Securing Internet Routing
RPKI Deployment Status in Bangladesh
BKNIX Peering Forum 2019: Securing Internet Routing
An Evolving Era of Botnet Empires @ BSides Las Vegas
I See You
32nd TWNIC IP OPM: ROA+ROV deployment & industry development
Kerberos
Mitm(man in the middle) ssl proxy attacks
Authenticated Identites in VoIP Call Control
Presentation To Vo Ip Round Table V2
Ad

More from Qrator Labs (14)

PDF
Годовой отчет Qrator Labs об угрозах интернета 2017
PDF
Qrator Labs annual report 2017
PDF
Memcached amplification DDoS: a 2018 threat.
PDF
DNS Survival Guide.
PDF
BGP Route Leaks at Ripe74
PDF
IoT: реальная угроза или маркетинг?
PDF
Network Security in 2016
PDF
Состояние сетевой безопасности в 2016 году
PDF
Caution i pv6 is here
PDF
Тренды 2015 года в области интернет-безопасности в россии и в мире
PDF
Russian and Worldwide Internet Security Trends 2015
PDF
How to measure global reachability
PDF
Lightning talk on connection between research and production code
PDF
DDoS mitigation for systems processing
Годовой отчет Qrator Labs об угрозах интернета 2017
Qrator Labs annual report 2017
Memcached amplification DDoS: a 2018 threat.
DNS Survival Guide.
BGP Route Leaks at Ripe74
IoT: реальная угроза или маркетинг?
Network Security in 2016
Состояние сетевой безопасности в 2016 году
Caution i pv6 is here
Тренды 2015 года в области интернет-безопасности в россии и в мире
Russian and Worldwide Internet Security Trends 2015
How to measure global reachability
Lightning talk on connection between research and production code
DDoS mitigation for systems processing

Recently uploaded (20)

PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
DOCX
Unit-3 cyber security network security of internet system
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
E -tech empowerment technologies PowerPoint
PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
Introduction to Information and Communication Technology
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
Internet___Basics___Styled_ presentation
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PDF
Testing WebRTC applications at scale.pdf
Unit-1 introduction to cyber security discuss about how to secure a system
presentation_pfe-universite-molay-seltan.pptx
Paper PDF World Game (s) Great Redesign.pdf
Unit-3 cyber security network security of internet system
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Slides PPTX World Game (s) Eco Economic Epochs.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
E -tech empowerment technologies PowerPoint
SAP Ariba Sourcing PPT for learning material
522797556-Unit-2-Temperature-measurement-1-1.pptx
Introduction to Information and Communication Technology
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
SASE Traffic Flow - ZTNA Connector-1.pdf
Internet___Basics___Styled_ presentation
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
Power Point - Lesson 3_2.pptx grad school presentation
introduction about ICD -10 & ICD-11 ppt.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Testing WebRTC applications at scale.pdf

BREAKING HTTPS WITH BGP HIJACKING

  • 1. qrator.net 2015 BREAKING HTTPS
 WITH BGP HIJACKING Artyom Gavrichenkov Qrator Labs ag@qrator.net
  • 2. qrator.net 2015 BGP Hijacking at a glance •  In the Internet, routing announcements are accepted without almost any validation •  This opens a possibility for a network operator to announce someone else’s network prefixes without permission
  • 3. qrator.net 2015 BGP Hijacking, a problem •  In the Internet, routing announcements are accepted without almost any validation •  This opens a possibility for a network operator to announce someone else’s network prefixes without permission •  The prefix may be announced with the same origin •  The prefix may be leaked •  A malicious operator can steal prefixes and blackhole them or intercept and modify traffic in transit •  A good operator can also steal someone’s network occasionally, by an error
  • 4. qrator.net 2015 BGP Hijacking, a problem •  In the Internet, routing announcements are accepted without almost any validation •  This opens a possibility for a network operator to announce someone else’s network prefixes without permission •  The prefix may be announced with the same origin •  The prefix may be leaked •  A malicious operator can steal prefixes and blackhole them or intercept and modify traffic in transit •  A good operator can also steal someone’s network occasionally, by an error •  A malicious employee of a good operator is then able to read and modify incoming traffic as well
  • 5. qrator.net 2015 BGP Hijacking, a problem •  In the Internet, routing announcements are accepted without almost any validation •  This opens a possibility for a network operator to announce someone else’s network prefixes without permission •  The prefix may be announced with the same origin •  The prefix may be leaked •  A malicious operator can steal prefixes and blackhole them or intercept and modify traffic in transit •  A good operator can also steal someone’s network occasionally, by an error •  A malicious employee of a good operator is then able to read and modify incoming traffic as well •  Unauthorized access to operator’s equipment can also be used for hijacking
  • 6. qrator.net 2015 BGP Hijacking, a problem •  ~30000 IPv4 prefixes leaked during last 2 weeks •  ~5000 of them in US •  ~2000 in Australia (far from US) •  ~5000 IPv4 prefixes leaking right now •  Almost all this is likely to be caused just by human missteps
  • 7. qrator.net 2015 BGP Hijacking, a problem •  ~30000 IPv4 prefixes leaked during last 2 weeks •  ~5000 of them in US •  ~2000 in Australia (far from US) •  ~5000 IPv4 prefixes leaking right now •  Almost all this is likely to be caused just by human missteps •  Why attackers don’t steal prefixes?
  • 8. qrator.net 2015 Detection of a hijacking •  Bogus AS Path at Routeviews or some providers’ looking glasses •  Change in TTL •  Increased RTT
  • 9. qrator.net 2015 Detection of a hijacking: hardly possible •  Bogus AS Path at Routeviews or some providers’ looking glasses – hard to discover without an advanced monitoring system •  Change in TTL – easy for a MitM to hide •  Increased RTT
  • 10. qrator.net 2015 “Global Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/23 to its upstream AS B. 3.  ?
  • 11. qrator.net 2015 “Global Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/23 to its upstream AS B. 3.  More specific route wins the battle (except IXs, where it may lose), and all traffic to X.Y.Z.1 starts to flow into AS M via AS B. 4.  All users of X.Y.Z.1 immediately notice increased latency. 5.  A bell rings, AS A and AS B figure out the problem and solve it somehow together during next 4-5 business days
  • 12. qrator.net 2015 Detection of a hijacking: hardly possible •  Bogus AS Path at Routeviews or some providers’ looking glasses – hard to discover without an advanced monitoring system •  Change in TTL – easy for a MitM to hide •  Increased RTT
  • 13. qrator.net 2015 Detection of a hijacking: hardly possible •  Bogus AS Path at Routeviews or some providers’ looking glasses – hard to discover without an advanced monitoring system •  Change in TTL – easy for a MitM to hide •  Increased RTT – between what?
  • 14. qrator.net 2015 “Local Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B. 3.  ??
  • 15. qrator.net 2015 “Local Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B. 3.  It depends on the relations between B and C •  If B is C’s customer: •  B will prefer the route originating from M •  C will prefer the route originating from A or B(M)
  • 16. qrator.net 2015 “Local Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B. 3.  It depends on the relations between B and C •  If B is C’s customer: •  B will prefer the route originating from M •  C will prefer the route originating from A or B(M) => A global hijacking is possible
  • 17. qrator.net 2015 “Local Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B. 3.  It depends on the relations between B and C •  If B is C’s customer: •  B will prefer the route originating from M •  C will prefer the route originating from A or B(M) •  If B is C’s provider: •  C will prefer the route originating from A •  B will prefer the route originating from C(A) or M => A global hijacking is possible
  • 18. qrator.net 2015 “Local Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B. 3.  It depends on the relations between B and C •  If B is C’s customer: •  B will prefer the route originating from M •  C will prefer the route originating from A or B(M) •  If B is C’s provider: •  C will prefer the route originating from A •  B will prefer the route originating from C(A) or M => A global hijacking is possible => Hijacking is local to B (at best)
  • 19. qrator.net 2015 That was an easy part.
  • 20. qrator.net 2015 “Local Hijacking” 1.  Prefix X.Y.Z.0/22 belongs to AS A, which announces it to its upstream AS C 2.  One day, AS M announces X.Y.Z.0/22 to its upstream AS B. 3.  What happens in B and C, depends on the relations between B and C 4.  What if B and C aren’t directly connected? Things get more complicated in other AS all over the world
  • 21. qrator.net 2015 “Local Hijacking” •  Things get more complicated in other AS all over the world •  It is possible to steal a prefix “locally” – in a part of the Internet, perfectly isolated by inter-AS relations •  In fact, that’s why BGP Anycast works •  RTT will not increase significantly, so no one will notice •  Looking glasses of major network operators will show valid announces
  • 22. qrator.net 2015 “Local Hijacking” •  Things get more complicated in other AS all over the world •  It is possible to steal a prefix “locally” – in a part of the Internet, perfectly isolated by inter-AS relations •  In fact, that’s why BGP Anycast works •  RTT will not increase significantly, so no one will notice •  Looking glasses of major network operators will show valid announces •  But why would we need that?
  • 23. qrator.net 2015 Obtaining a TLS certificate from CA •  The procedure is generally as follows: 1.  An account is created at the Web site of a certificate authority 2.  A CSR is created and uploaded 3.  CA offers plenty of options to verify domain ownership: •  WHOIS records •  A specific HTML page under a specific URL •  Custom token in DNS TXT Record •  … 4.  After the ownership is verified, you get your signed TLS certificate for your money (or sometimes for free)
  • 24. qrator.net 2015 Stealing a valid TLS certificate, pt. 1 Prerequisite: you need to find a CA close to your AS in topological sense 1.  A prefix hosting an IP for the victim’s Web site is hijacked locally, so that the following conditions apply: •  At this time victim’s AS should notice nothing •  The chosen CA’s traffic is routed to the hijacker 2.  Go on: register with the chosen CA, upload a CSR, get an HTML page, upload HTML to your own server, pay and obtain the signed certificate
  • 25. qrator.net 2015 Stealing a valid TLS certificate, pt. 2 Prerequisite: you need to find a CA close to your AS in topological sense 1.  A prefix hosting an authoritative DNS for the victim’s Web site is hijacked locally, so that the following conditions apply: •  At this time victim’s AS should notice nothing •  The chosen CA’s traffic is routed to the hijacker 2.  Go on: register with the chosen CA, upload a CSR, get a token, set up DNS TXT on your own server, pay and obtain the signed certificate
  • 26. qrator.net 2015 Stealing a valid TLS certificate, pt. 3 Prerequisite: you need to find a CA close to your AS in topological sense 1.  A prefix hosting a WHOIS server for the victim’s domain registrar is hijacked locally, so that the following conditions apply: •  At this time victim’s AS should notice nothing •  The chosen CA’s traffic is routed to the hijacker 2.  …
  • 27. qrator.net 2015 Stealing a valid TLS certificate •  The hijack is local: victim’s AS should notice nothing or almost nothing – Haha, some guy in Kerbleckistan experiences problems connecting to our site! •  However, the resulting TLS certificate is perfectly global: Kerbleckistanian CA is not that worse than GoDaddy or Comodo, the certificate would be valid anywhere •  The resulting TLS certificate can be used for MitM attacks anywhere in the world
  • 28. qrator.net 2015 Certificate Authority Hijacking Vice versa: •  We can steal victim’s prefix near selected CA’s AS •  We can steal CA’s prefix near victim’s AS as well •  The implementation is just a bit more complex
  • 29. qrator.net 2015 Stealing a valid TLS certificate •  It’s not very hard to do a local hijacking. You only need this: •  A border router under your control •  Information about your BGP peers: their customers, providers, peerings. This is not a top secret: http://radar.qrator.net/ figures out this information on a hourly basis, using public data only: traceroute, AS Paths, etc. •  That’s all
  • 31. qrator.net 2015 Mitigating the problem. …yuck.
  • 32. qrator.net 2015 Mitigating the problem. …yuck. •  There’s obviously a problem with current SSL/TLS PKI •  But that’s not something we can fix tomorrow •  There’s obviously a problem with Internet routing •  But that’s not something we can fix in a decade
  • 33. qrator.net 2015 Mitigating the problem. •  We have to stick to workarounds: •  BGP monitoring, able to detect hijacking in Kerbleckistan •  http://radar.qrator.net/ (it’s free, by the way) •  http://research.dyn.com/ •  http://www.bgpmon.net/ •  Watch your prefixes! •  RFC 7469 [draft] •  Browser plug-ins restricting certificate updates (Certificate Patrol etc.) •  DANE? •  …
  • 34. qrator.net 2015 Mitigating the problem. •  We have to stick to workarounds: •  Browser plug-ins restricting certificate updates (Certificate Patrol etc.)
  • 35. qrator.net 2015 Mitigating the problem •  There’s obviously a problem with current SSL/TLS PKI •  There’s obviously a problem with Internet routing •  Maybe it’s high time to discuss and fix those problems
  • 36. qrator.net 2015 Black Hat Sound Bytes •  There are flaws in Internet routing and in TLS PKI concept. There are also corresponding risks •  Those risks could be mitigated. However, the better PKI design will help to do it easier •  BGP monitoring systems are really useful! If you are in charge of network security in a large ISP, please start using them right away Thank you! mailto: Artyom Gavrichenkov <ag@qrator.net>