SlideShare a Scribd company logo
1 of 34
COVERT TIMING CHANNELS USING
HTTP CACHE HEADERS
Denis Kolegov, Oleg Broslavsky, Nikita Oleksov
Tomsk State University
Information Security and Cryptography Department
Introduction
A covert channel is a mechanism for sending and receiving information
between hosts without alerting any firewalls and IDSs
HTTP is one of the most used Internet protocol so detections of the
covert channels over the HTTP is an important research area
Example – HTTP Headers
Using steganography methods in header values
Suppose that
Then
“en” 0
“fr” 1
Accept-Language: en,fr 01
Accept-Language: fr,en 10
Accept-Language: en,fr,en,fr,en,en,en,en 0x50
Covert Channels’ Usage
• Botnet C&C channel
• In-band key exchange
• Transfer illegal content
• Stealing information from
“secure” environments
Types Of Covert Channels
TIME DEPENDENCE
• Storage channels – a storage location is written to and read from
• Timing channels – transmitting information through time values
DIRECTION
• Client – server
• Server – client
Client-Server Covert Channels
Client-server covert channels are easier to implement, e.g. covert
storage channel via If-Range request header
GET / HTTP/1.1
Host: 162.71.12.43
If-Range: 120c7bL-32bL-4f86d4105ac62L
…
Hex-encoded data
Server-Client Covert Channels
Server-client channels are more complicated and most of them are
timing channels so it is more interesting to research
Basic HTTP Cache Headers
RESPONSE (SERVER) HEADERS
• Last-Modified
• ETag
REQUEST (CLIENT) HEADERS
• If-Modified-Since
• If-Unmodified-Since
• If-Match
• If-Non-Match
Request
Response
Last-Modified Response Header
Last-Modified HTTP header stores a date of the last web entity’s modification
HTTP/1.1 200 OK
Server: nginx/1.1.19
Date: Wed, 02 Apr 2014 14:33:39 GMT
Content-Type: text/html
Content-Length: 124
Last-Modified: Wed, 02 Apr 2014 14:33:39 GMT
Connection: keep-alive
(data)
GET / HTTP/1.1
Host: 162.71.12.43
(other headers)
ETag Response Header
The ETag value is formed from the hex values of
120c7bL-32bL-4f86d4105ac62L
file's inode size last-modified time (mtime)
GET / HTTP/1.1
….
HTTP/1.1 200 OK
Server: Apache/2.2.22 (Ubuntu)
Date: Wed, 02 Apr 2014 14:33:39 GMT
Content-Length: 124
ETag: 120c7bL-32bL-4f86d4105ac62L
(data)
Common Usage of Cache Request Headers
HTTP cache headers allows web-client not to download a page if it
hasn’t been changed since the certain time
GET / HTTP/1.1
Host: 162.71.12.43
If-Modified-Since:
Wed, 02 Apr 2014 14:33:39 GMT
(other headers)
GET / HTTP/1.1
Host: 162.71.12.43
If-None-Match:
120c7bL-32bL-4f86d4105ac62L
(other headers)
Common Usage of Cache Request Headers
Second pair of headers does the same as previous but with logically inverse
condition
GET / HTTP/1.1
Host: 162.71.12.43
If-Unmodified-Since:
Wed, 02 Apr 2014 14:33:39 GMT
(other headers)
GET / HTTP/1.1
Host: 162.71.12.43
If-Match:
120c7bL-32bL-4f86d4105ac62L
(other headers)
General Covert Channels Idea – Client Side
HTTP
request
Get new header
value
Received ‘1’
If page
changed
Store header value
Received ‘0’
Wait
n seconds
then else
General Covert Channels Idea – Server Side
On the server side we can use two different models:
First context
Minimum privileges on server:
• SECRET.FILE – read only
• Covert channel web page –
write only
Second context
Web server is fully controlled
by an attacker
Covert Channels Using HTTP Cache Headers
• Last-Modified header value
• Using If-Modified-Since header
• Using If-Unmodified-Since header
• ETag header value
• Using If-Match header
• Using If-None-Match header
Last-Modified based
ETag based
Ways to Implement
In tons of possible ways we focus on
• Python – Socket library
• C++ – Boost ASIO library
• С – simple C socket library
We choose C due to its highest performance (among these ways) and
decent stability. Also we choose server model in first context for its
least requirements.
Issues in first context
Some problems we solved during implementation
Issue Solution
Server-client synchronization Special synchronizing function
Different time of requests Dynamic sleep time
Lateness after sleep “Active” sleep
High CPU load with “active sleep” “Dynamic” and “active” sleep
combination
Issue 1
Necessity of synchronization
“read” (web client) and “write”
(host) services
Solution:
Synchronizing function that does
requests at a maximum speed
(without sleep)
Send HTTP
request
Get host response
If page has
been
changed
then else
Issue 2
Different time of requests can
break services synchronization
Solution:
Dynamic sleep time equals to
(sleep_time – time took for
request)
Calculate time
took for request
diff_time
Sleep
(sleep_time – diff_time) µs
Issue 3
Inaccurate sleep - after sleep
(usleep() is used) the program
can awake with 10-200μs
lateness
Solution:
Use “active sleep” - calculation
time difference between last
request and current moment
while it is less than sleep_time
Calc diff_time
thenelse If diff_time
<
sleep_time
Issue 4
High CPU load with “active sleep”
Solution:
Combine “active” and “dynamic”
sleep
Calculate diff_time
If diff_time <
CONST
thenelse
Sleep
(sleep_time – CONST –
request_time)
Advantages Of Covert Timing Channels
• Does not modify common HTTP request structure
• Does not require web-server modifications
• Any read-only activity on web page that is used by the channel do
not break its work
• If-* specified channels can work even if main header (Last-Modified
and ETag) is disabled
Specification
Header
Sleep
time
Min start
sequence
Avg sequence
Max
sequence
Speed Accuracy
Last-
Modified
2s 3400 bits 10145 bits 22143 bits 0.5 bit/s 99,87%
1s 3200 bits 8848 bits 19712 bits 1bit/s 99,82%
ETag
1s 3200 bits 8848 bits 19712 bits 1bit/s 99,82%
0.5s 2400 bits 8142 bits 18123 bits 2 bit/s 99,5%
Client in C, server in first context model
Second server context model
In the second context we can avoid necessity of client-server synchronization
by waiting for the request and responding directly:
Send new header
value
Send old header value
If current
message bit
is ‘1’
Store header value
then else
WAIT for HTTP
request
Specification
Second context model. Client in C, controlled web server on PHP
+
Header Network
Average HTTP
ping
Speed
ETag
Local host 0.55 ms 986 bit/s
Data center local network 1.63 ms 845.65 bit/s
Local network 6.9 ms 295.69 bit/s
Internet 383.2 ms 4.89 bit/s
Covert Channels in Browsers
Kenton Born. «Browser-based covert data exfiltration»
W. Alcorn, C. Frichot, M. Orru. «The Browser Hacker’s Handbook»
DOMAIN NAME SYSTEM (DNS)
Query: “Where is some.domain.example.com?”
Response: “It is at 88.0.13.37!”
some.domain.example.com
Subdomain Domain
bigbrother.watchingme.evil.com
Information Domain
IT’S CLIENT-SERVER CHANNEL
Browser Context
Purpose:
To implement covert timing channels using browser-side technologies
as JavaScript, AJAX and different HTML features
Timing Channels in Browsers
Problems:
• Lack of any “sleep” function
• Low accuracy of existing time management functions
• Difficulties with synchronization of covert channel’s server and client
So implementation of the used model is pointless, but it is possible to
implement covert channels in these restrictions using controlled web
server
Issues
Issue Solution
Server-client synchronization Client does special request to begin
conversation
End of message determination Client receive some special HTTP
code in response, e.g. 404 – Not
Found or 403 - Forbidden
Single client communication only Open a session that stores
transferring bit number for each
client
The Browser Exploitation Framework
“BeEF allows the professional penetration tester to assess the actual
security posture of a target environment by using client-side attack
vectors.”
BeEF ETag Server-to-Client Tunnel
ETag Tunnel in BeEF consist of 2parts: extension in Ruby, that
implements server side logic via couple of web pages mounted to
BeEF webserver, and module in JS, that is responsible for receiving
information from C&C at zombie client
ETag
Covert
Channel
BeEF
extension
BeEF
module
BeEF Etag Specification
BeEF ETag server-to-client tunnel testing results
Network
Average
ping
Average
HTTP
ping
256 bit 1024 bit
Local host 0.045 ms 0.6 ms 10.11 bit/s 9.9 bit/s
Local network 18 ms 19.8 ms 10.3 bit/s 9.78 bit/s
Internet 176 ms 360.9 ms 5.09 bit/s 4.97 bit/s
Proof Of Concept
http://youtu.be/W2qWA7XUzGQ
https://github.com/beefproject/beef
Oleg Broslavsky
ovbroslavsky@gmail.com
@yalegko
Denis Kolegov
dnkolegov@gmail.com
@dnkolegov
Nikita Oleksov
neoleksov@gmail.com
@neoleksov

More Related Content

What's hot

HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战Jerry Qu
 
21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboardsDenis Ristic
 
HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30Jxck Jxck
 
Performance #4 network
Performance #4  networkPerformance #4  network
Performance #4 networkVitali Pekelis
 
Service workers - Velocity 2016 Training
Service workers - Velocity 2016 TrainingService workers - Velocity 2016 Training
Service workers - Velocity 2016 TrainingPatrick Meenan
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for DevelopersSvetlin Nakov
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016Daniel Stenberg
 
Web Performance Optimization with HTTP/3
Web Performance Optimization with HTTP/3Web Performance Optimization with HTTP/3
Web Performance Optimization with HTTP/3SangJin Kang
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesBrent Shaffer
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxyBrendan Jennings
 
Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...Jaap ter Woerds
 
Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1PacSecJP
 
Netty 4-based RPC System Development
Netty 4-based RPC System DevelopmentNetty 4-based RPC System Development
Netty 4-based RPC System DevelopmentAllan Huang
 
Attacking http2 implementations (1)
Attacking http2 implementations (1)Attacking http2 implementations (1)
Attacking http2 implementations (1)John Villamil
 
02 wireshark http-sept_15_2009
02   wireshark http-sept_15_200902   wireshark http-sept_15_2009
02 wireshark http-sept_15_2009Vothe Dung
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 

What's hot (20)

An Introduction to HTTP
An Introduction to HTTPAn Introduction to HTTP
An Introduction to HTTP
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战
 
21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards
 
HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30
 
Performance #4 network
Performance #4  networkPerformance #4  network
Performance #4 network
 
Building Netty Servers
Building Netty ServersBuilding Netty Servers
Building Netty Servers
 
Service workers - Velocity 2016 Training
Service workers - Velocity 2016 TrainingService workers - Velocity 2016 Training
Service workers - Velocity 2016 Training
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016
 
Web Performance Optimization with HTTP/3
Web Performance Optimization with HTTP/3Web Performance Optimization with HTTP/3
Web Performance Optimization with HTTP/3
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our Lives
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
 
Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...Building scalable network applications with Netty (as presented on NLJUG JFal...
Building scalable network applications with Netty (as presented on NLJUG JFal...
 
Bo2004
Bo2004Bo2004
Bo2004
 
Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1
 
Netty 4-based RPC System Development
Netty 4-based RPC System DevelopmentNetty 4-based RPC System Development
Netty 4-based RPC System Development
 
Attacking http2 implementations (1)
Attacking http2 implementations (1)Attacking http2 implementations (1)
Attacking http2 implementations (1)
 
02 wireshark http-sept_15_2009
02   wireshark http-sept_15_200902   wireshark http-sept_15_2009
02 wireshark http-sept_15_2009
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
DPNHTW
DPNHTWDPNHTW
DPNHTW
 

Similar to Covert timing channels using HTTP cache headers

Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Xavier Lucas
 
Cdn technology overview
Cdn technology overviewCdn technology overview
Cdn technology overviewYoohyun Kim
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...Edward Burns
 
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Ontico
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)Gurjot Singh
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014Amazon Web Services
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Nidhitransport
 
HTTP Request Smuggling
HTTP Request SmugglingHTTP Request Smuggling
HTTP Request SmugglingAkash Ashokan
 
21 Www Web Services
21 Www Web Services21 Www Web Services
21 Www Web Servicesroyans
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisationgrooverdan
 
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Stamo Petkov
 
Taking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketTaking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketShahriar Hyder
 
Accelerating and Securing your Applications in AWS. In-depth look at Solving ...
Accelerating and Securing your Applications in AWS. In-depth look at Solving ...Accelerating and Securing your Applications in AWS. In-depth look at Solving ...
Accelerating and Securing your Applications in AWS. In-depth look at Solving ...Amazon Web Services
 
Unit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer networkUnit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer network4SI21CS112RakeshMS
 
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...Sencha
 
cache concepts and varnish-cache
cache concepts and varnish-cachecache concepts and varnish-cache
cache concepts and varnish-cacheMarc Cortinas Val
 

Similar to Covert timing channels using HTTP cache headers (20)

Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28
 
Cdn technology overview
Cdn technology overviewCdn technology overview
Cdn technology overview
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
 
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
 
computer networking
computer networkingcomputer networking
computer networking
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02
 
Http smuggling 1 200523064027
Http smuggling 1 200523064027Http smuggling 1 200523064027
Http smuggling 1 200523064027
 
HTTP Request Smuggling
HTTP Request SmugglingHTTP Request Smuggling
HTTP Request Smuggling
 
21 Www Web Services
21 Www Web Services21 Www Web Services
21 Www Web Services
 
Http/2
Http/2Http/2
Http/2
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisation
 
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
 
Taking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketTaking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocket
 
Accelerating and Securing your Applications in AWS. In-depth look at Solving ...
Accelerating and Securing your Applications in AWS. In-depth look at Solving ...Accelerating and Securing your Applications in AWS. In-depth look at Solving ...
Accelerating and Securing your Applications in AWS. In-depth look at Solving ...
 
Unit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer networkUnit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer network
 
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
 
cache concepts and varnish-cache
cache concepts and varnish-cachecache concepts and varnish-cache
cache concepts and varnish-cache
 

More from yalegko

SD-WAN Internet Census
SD-WAN Internet CensusSD-WAN Internet Census
SD-WAN Internet Censusyalegko
 
So Your WAF Needs a Parser
So Your WAF Needs a ParserSo Your WAF Needs a Parser
So Your WAF Needs a Parseryalegko
 
WebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in DepthWebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in Depthyalegko
 
[ISC] Docker + Swarm
[ISC] Docker + Swarm[ISC] Docker + Swarm
[ISC] Docker + Swarmyalegko
 
How to Open School For Young Hackers
How to Open School For Young HackersHow to Open School For Young Hackers
How to Open School For Young Hackersyalegko
 
How to make school CTF
How to make school CTFHow to make school CTF
How to make school CTFyalegko
 
AOP and Inversion of Conrol
AOP and Inversion of ConrolAOP and Inversion of Conrol
AOP and Inversion of Conrolyalegko
 
White-Box HMAC. Make your cipher secure to white-box attacks.
White-Box HMAC. Make your cipher secure to white-box attacks.White-Box HMAC. Make your cipher secure to white-box attacks.
White-Box HMAC. Make your cipher secure to white-box attacks.yalegko
 
White box cryptography
White box cryptographyWhite box cryptography
White box cryptographyyalegko
 
How to admin
How to adminHow to admin
How to adminyalegko
 
ИИ: Этические аспекты проблемы выбора
ИИ: Этические аспекты проблемы выбораИИ: Этические аспекты проблемы выбора
ИИ: Этические аспекты проблемы выбораyalegko
 
Include and extend in Ruby
Include and extend in RubyInclude and extend in Ruby
Include and extend in Rubyyalegko
 
Not a children in da web
Not a children in da webNot a children in da web
Not a children in da webyalegko
 

More from yalegko (13)

SD-WAN Internet Census
SD-WAN Internet CensusSD-WAN Internet Census
SD-WAN Internet Census
 
So Your WAF Needs a Parser
So Your WAF Needs a ParserSo Your WAF Needs a Parser
So Your WAF Needs a Parser
 
WebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in DepthWebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in Depth
 
[ISC] Docker + Swarm
[ISC] Docker + Swarm[ISC] Docker + Swarm
[ISC] Docker + Swarm
 
How to Open School For Young Hackers
How to Open School For Young HackersHow to Open School For Young Hackers
How to Open School For Young Hackers
 
How to make school CTF
How to make school CTFHow to make school CTF
How to make school CTF
 
AOP and Inversion of Conrol
AOP and Inversion of ConrolAOP and Inversion of Conrol
AOP and Inversion of Conrol
 
White-Box HMAC. Make your cipher secure to white-box attacks.
White-Box HMAC. Make your cipher secure to white-box attacks.White-Box HMAC. Make your cipher secure to white-box attacks.
White-Box HMAC. Make your cipher secure to white-box attacks.
 
White box cryptography
White box cryptographyWhite box cryptography
White box cryptography
 
How to admin
How to adminHow to admin
How to admin
 
ИИ: Этические аспекты проблемы выбора
ИИ: Этические аспекты проблемы выбораИИ: Этические аспекты проблемы выбора
ИИ: Этические аспекты проблемы выбора
 
Include and extend in Ruby
Include and extend in RubyInclude and extend in Ruby
Include and extend in Ruby
 
Not a children in da web
Not a children in da webNot a children in da web
Not a children in da web
 

Recently uploaded

VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

Covert timing channels using HTTP cache headers

  • 1. COVERT TIMING CHANNELS USING HTTP CACHE HEADERS Denis Kolegov, Oleg Broslavsky, Nikita Oleksov Tomsk State University Information Security and Cryptography Department
  • 2. Introduction A covert channel is a mechanism for sending and receiving information between hosts without alerting any firewalls and IDSs HTTP is one of the most used Internet protocol so detections of the covert channels over the HTTP is an important research area
  • 3. Example – HTTP Headers Using steganography methods in header values Suppose that Then “en” 0 “fr” 1 Accept-Language: en,fr 01 Accept-Language: fr,en 10 Accept-Language: en,fr,en,fr,en,en,en,en 0x50
  • 4. Covert Channels’ Usage • Botnet C&C channel • In-band key exchange • Transfer illegal content • Stealing information from “secure” environments
  • 5. Types Of Covert Channels TIME DEPENDENCE • Storage channels – a storage location is written to and read from • Timing channels – transmitting information through time values DIRECTION • Client – server • Server – client
  • 6. Client-Server Covert Channels Client-server covert channels are easier to implement, e.g. covert storage channel via If-Range request header GET / HTTP/1.1 Host: 162.71.12.43 If-Range: 120c7bL-32bL-4f86d4105ac62L … Hex-encoded data
  • 7. Server-Client Covert Channels Server-client channels are more complicated and most of them are timing channels so it is more interesting to research
  • 8. Basic HTTP Cache Headers RESPONSE (SERVER) HEADERS • Last-Modified • ETag REQUEST (CLIENT) HEADERS • If-Modified-Since • If-Unmodified-Since • If-Match • If-Non-Match Request Response
  • 9. Last-Modified Response Header Last-Modified HTTP header stores a date of the last web entity’s modification HTTP/1.1 200 OK Server: nginx/1.1.19 Date: Wed, 02 Apr 2014 14:33:39 GMT Content-Type: text/html Content-Length: 124 Last-Modified: Wed, 02 Apr 2014 14:33:39 GMT Connection: keep-alive (data) GET / HTTP/1.1 Host: 162.71.12.43 (other headers)
  • 10. ETag Response Header The ETag value is formed from the hex values of 120c7bL-32bL-4f86d4105ac62L file's inode size last-modified time (mtime) GET / HTTP/1.1 …. HTTP/1.1 200 OK Server: Apache/2.2.22 (Ubuntu) Date: Wed, 02 Apr 2014 14:33:39 GMT Content-Length: 124 ETag: 120c7bL-32bL-4f86d4105ac62L (data)
  • 11. Common Usage of Cache Request Headers HTTP cache headers allows web-client not to download a page if it hasn’t been changed since the certain time GET / HTTP/1.1 Host: 162.71.12.43 If-Modified-Since: Wed, 02 Apr 2014 14:33:39 GMT (other headers) GET / HTTP/1.1 Host: 162.71.12.43 If-None-Match: 120c7bL-32bL-4f86d4105ac62L (other headers)
  • 12. Common Usage of Cache Request Headers Second pair of headers does the same as previous but with logically inverse condition GET / HTTP/1.1 Host: 162.71.12.43 If-Unmodified-Since: Wed, 02 Apr 2014 14:33:39 GMT (other headers) GET / HTTP/1.1 Host: 162.71.12.43 If-Match: 120c7bL-32bL-4f86d4105ac62L (other headers)
  • 13. General Covert Channels Idea – Client Side HTTP request Get new header value Received ‘1’ If page changed Store header value Received ‘0’ Wait n seconds then else
  • 14. General Covert Channels Idea – Server Side On the server side we can use two different models: First context Minimum privileges on server: • SECRET.FILE – read only • Covert channel web page – write only Second context Web server is fully controlled by an attacker
  • 15. Covert Channels Using HTTP Cache Headers • Last-Modified header value • Using If-Modified-Since header • Using If-Unmodified-Since header • ETag header value • Using If-Match header • Using If-None-Match header Last-Modified based ETag based
  • 16. Ways to Implement In tons of possible ways we focus on • Python – Socket library • C++ – Boost ASIO library • С – simple C socket library We choose C due to its highest performance (among these ways) and decent stability. Also we choose server model in first context for its least requirements.
  • 17. Issues in first context Some problems we solved during implementation Issue Solution Server-client synchronization Special synchronizing function Different time of requests Dynamic sleep time Lateness after sleep “Active” sleep High CPU load with “active sleep” “Dynamic” and “active” sleep combination
  • 18. Issue 1 Necessity of synchronization “read” (web client) and “write” (host) services Solution: Synchronizing function that does requests at a maximum speed (without sleep) Send HTTP request Get host response If page has been changed then else
  • 19. Issue 2 Different time of requests can break services synchronization Solution: Dynamic sleep time equals to (sleep_time – time took for request) Calculate time took for request diff_time Sleep (sleep_time – diff_time) µs
  • 20. Issue 3 Inaccurate sleep - after sleep (usleep() is used) the program can awake with 10-200μs lateness Solution: Use “active sleep” - calculation time difference between last request and current moment while it is less than sleep_time Calc diff_time thenelse If diff_time < sleep_time
  • 21. Issue 4 High CPU load with “active sleep” Solution: Combine “active” and “dynamic” sleep Calculate diff_time If diff_time < CONST thenelse Sleep (sleep_time – CONST – request_time)
  • 22. Advantages Of Covert Timing Channels • Does not modify common HTTP request structure • Does not require web-server modifications • Any read-only activity on web page that is used by the channel do not break its work • If-* specified channels can work even if main header (Last-Modified and ETag) is disabled
  • 23. Specification Header Sleep time Min start sequence Avg sequence Max sequence Speed Accuracy Last- Modified 2s 3400 bits 10145 bits 22143 bits 0.5 bit/s 99,87% 1s 3200 bits 8848 bits 19712 bits 1bit/s 99,82% ETag 1s 3200 bits 8848 bits 19712 bits 1bit/s 99,82% 0.5s 2400 bits 8142 bits 18123 bits 2 bit/s 99,5% Client in C, server in first context model
  • 24. Second server context model In the second context we can avoid necessity of client-server synchronization by waiting for the request and responding directly: Send new header value Send old header value If current message bit is ‘1’ Store header value then else WAIT for HTTP request
  • 25. Specification Second context model. Client in C, controlled web server on PHP + Header Network Average HTTP ping Speed ETag Local host 0.55 ms 986 bit/s Data center local network 1.63 ms 845.65 bit/s Local network 6.9 ms 295.69 bit/s Internet 383.2 ms 4.89 bit/s
  • 26. Covert Channels in Browsers Kenton Born. «Browser-based covert data exfiltration» W. Alcorn, C. Frichot, M. Orru. «The Browser Hacker’s Handbook» DOMAIN NAME SYSTEM (DNS) Query: “Where is some.domain.example.com?” Response: “It is at 88.0.13.37!” some.domain.example.com Subdomain Domain bigbrother.watchingme.evil.com Information Domain IT’S CLIENT-SERVER CHANNEL
  • 27. Browser Context Purpose: To implement covert timing channels using browser-side technologies as JavaScript, AJAX and different HTML features
  • 28. Timing Channels in Browsers Problems: • Lack of any “sleep” function • Low accuracy of existing time management functions • Difficulties with synchronization of covert channel’s server and client So implementation of the used model is pointless, but it is possible to implement covert channels in these restrictions using controlled web server
  • 29. Issues Issue Solution Server-client synchronization Client does special request to begin conversation End of message determination Client receive some special HTTP code in response, e.g. 404 – Not Found or 403 - Forbidden Single client communication only Open a session that stores transferring bit number for each client
  • 30. The Browser Exploitation Framework “BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors.”
  • 31. BeEF ETag Server-to-Client Tunnel ETag Tunnel in BeEF consist of 2parts: extension in Ruby, that implements server side logic via couple of web pages mounted to BeEF webserver, and module in JS, that is responsible for receiving information from C&C at zombie client ETag Covert Channel BeEF extension BeEF module
  • 32. BeEF Etag Specification BeEF ETag server-to-client tunnel testing results Network Average ping Average HTTP ping 256 bit 1024 bit Local host 0.045 ms 0.6 ms 10.11 bit/s 9.9 bit/s Local network 18 ms 19.8 ms 10.3 bit/s 9.78 bit/s Internet 176 ms 360.9 ms 5.09 bit/s 4.97 bit/s