We know where you live Systematically Fingerprinting Low- and - - PowerPoint PPT Presentation

we know where you live
SMART_READER_LITE
LIVE PREVIEW

We know where you live Systematically Fingerprinting Low- and - - PowerPoint PPT Presentation

We know where you live Systematically Fingerprinting Low- and Medium-interaction Honeypots at Internet Scale Alexander Vetterl University of Cambridge alexander.vetterl@cl.cam.ac.uk Introduction Honeypot s: A resource whose value is


slide-1
SLIDE 1

We know where you live

Systematically Fingerprinting Low- and Medium-interaction Honeypots at Internet Scale

Alexander Vetterl

University of Cambridge

✉ alexander.vetterl@cl.cam.ac.uk

slide-2
SLIDE 2

Introduction

Honeypot s: A resource whose value is being at t acked or compromised

— Honeypot s have been focused for years

  • n t he monit oring of human act ivit y

— Adversaries at t empt t o dist inguish honeypot s by execut ing commands — Honeypot s cont inuously fix commands t o be “ more like bash”

Cowrie – commands implement ed

slide-3
SLIDE 3

How we currently build (SSH) honeypots

1. Find a library t hat implement s t he desired prot ocol (e.g. T wist edConch for S S H) 2. Writ e t he Pyt hon program t o be “ j ust like bash” 3. Fix ident it y st rings, error messages et c. t o be “ j ust like OpenS S H” Problem: There are lot of subt le differences bet ween T wist edConch and OpenS S H!

RFCs

OpenS S H TwistedConch Cowrie sshd bash

slide-4
SLIDE 4

Popular Honeypots

slide-5
SLIDE 5

Methodology – Overview

We send probes t o 40 different implement at ions — 9 Honeypot s — OpenS S H, T wist edConch — Busybox, Ubunt u/ FreeBS D t elnet d — Apache, nginx We find probes t hat result in dist inct ive responses We find ‘ t he’ probe t hat result s in t he most dist inct ive response across all implement at ions and perform Int ernet wide scans

 Triggered 158 million responses

slide-6
SLIDE 6

Methodology – Cosine similarity

— We represent our responses as a vect or of feat ures appropriat e t o t he net work prot ocol — The higher t he cosine similarit y coefficient , t he more similar t he t wo it ems under comparison

x1 x2

Item 1 Item 2

Cosine distance

slide-7
SLIDE 7

Probe generation – Telnet and HTTP

25 440 Telnet negot iat ion sequences (RFC854) 47 600 HTTP request s (RFC2616 and RFC2518)

IAC escape character

IAC WILL BINARY IAC WILL LOGOUT

4 option codes (WILL, WON’T, DO, DON’T) 40 Telnet options 123 non-printable, non- alphanumeric characters

GET /. HTTP/0.0.\r\n\r\n

43 different request methods 9 different HTTP versions (HTTP/0.0 to HTTP/2.2)

slide-8
SLIDE 8

Probe generation – SSH

192 S S H version st rings (RFC4253)

— [SSH, ssh]-[0.0 – 3.2]-[OpenSSH, ""] SP [FreeBSD, ""][\r\n, ""]

58 752 KEX_INIT packet s (RFC4250)

— 16 key-exchange algorithms, 2 host key algorithms — 15 encryption algorithms, 5 MAC algorithms, — 3 compression algorithms

Three variant s of (malformed) packet s

Packet Length Padding Length Payload Random Padding MAC

4 bytes 1 byte variable 4-255 bytes

slide-9
SLIDE 9

Results – Similarity across implementations

SSH

n=157 925 376

Telnet

n=356 160

HTTP

n=571 212

slide-10
SLIDE 10

— (Random) padding of S S H packet s — S ervers close t he connect ion as a result of bad packet s — Not support ed or ignored HTTP met hods — Not support ed or ignored Telnet negot iat ion opt ions — Different error messages ret urned — and more…

Results – Reasons for distinctive responses

Packet Length Padding Length Payload Random Padding MAC

4 bytes 1 byte variable 4-255 bytes

slide-11
SLIDE 11

Results – Internet wide scans (Honeypots)

slide-12
SLIDE 12

Results – Mass Deployment

— 724 IPs run bot h an S S H and Web honeypot — Many honeypot s are host ed at well-known cloud providers

slide-13
SLIDE 13

Revision history for command selection

13

— We looked for commands in t he revision hist ory (uname -a, t ft p)

Cowrie ≥ 2016-11-02

Cowrie < 2016-11-02

slide-14
SLIDE 14

Results (SSH) – Updating Honeypots

— S S H Honeypot operat ors rarely updat e t heir honeypot s

slide-15
SLIDE 15

Results (SSH) – Set up options

Only 79%

  • f SSH honeypots have an unique host key

SSH Version strings

— 61 different version st rings — 72% use t he default – SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2

Hostname (uname

uname –a)

debnfwmgmt-02 is used for 296 honeypot s (14.6%

)

— This is the default hostname for Cowrie when it is used in T-Pot (Deutsche Telekom) — T-Pot is a popular docker container and combines 16 honeypots

slide-16
SLIDE 16

Legislation in the context of honeypots

16

In general much authorisation is implicit — Devices and services int ent ionally connect ed t o t he Int ernet — Web servers/ ft p servers wit h t he username ‘ anonymous’ and email address as password Our access was not unauthorised because the controller

  • f the honeypot has –

— int ent ionally made available a (vulnerable) syst em and — implicit ly permit s t he access of t he ‘ kind of quest ion’

slide-17
SLIDE 17

Impact and Countermeasures

We can detect your honeypots without even trying to send any credentials

— It is hard to tell from the logging that you've been detected! — It is easy to add scripts using these techniques into tools such as Metasploit!

Closely monitor and update your honeypots

— Honeypot operators are as bad as anyone with patching

Patching against the specific distinguishers is not a solution

— We developed a modified version of the OpenSSH daemon (sshd) which can front-end a Cowrie instance so that the protocol layer distinguishers will no longer work

slide-18
SLIDE 18

Conclusion

Presented a generic approach for fingerprinting honeypots (“class break”)

— With a TCP handshake and usually one further packet we identify if you are running Kippo, Cowrie, Glastopf or various other (we believe all) low- and medium-interaction honeypots

Performed Internet wide scans for 9 different honeypots

— Found 7,605 honeypots residing on 6,125 IPv4 addresses — Maj ority are hosted at well known cloud providers — Only 39%

  • f SSH honeypots were updated within the previous 7 months

We need a new architecture for low- and medium-interaction honeypots

— The “ bad guys” can easily reproduce and implement our techniques

slide-19
SLIDE 19

Q & A

Alexander Vetterl alexander.vetterl@cl.cam.ac.uk

https://github.com/amv42/sshd-honeypot