we know where you live
play

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


  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

  2. Introduction Honeypot s: A resource whose value is being at t acked or compromised Cowrie – commands implement ed — Honeypot s have been focused for years on 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”

  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” RFCs OpenS S H TwistedConch sshd Cowrie bash Problem: There are lot of subt le differences bet ween T wist edConch and OpenS S H!

  4. Popular Honeypots

  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

  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 x 2 Item 2 Item 1 Cosine distance x 1

  7. Probe generation – Telnet and HTTP 25 440 Telnet negot iat ion sequences (RFC854) 4 option codes (WILL, WON’T, DO, DON’T) IAC WILL BINARY IAC WILL LOGOUT IAC escape character 40 Telnet options 47 600 HTTP request s (RFC2616 and RFC2518) 43 different request methods GET /. HTTP/0.0.\r\n\r\n 123 non-printable, non- 9 different HTTP versions alphanumeric characters (HTTP/0.0 to HTTP/2.2)

  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 Padding Random Payload MAC Length Length Padding 1 byte variable 4 bytes 4-255 bytes

  9. Results – Similarity across implementations SSH n=157 925 376 Telnet n=356 160 HTTP n=571 212

  10. Results – Reasons for distinctive responses — (Random) padding of S S H packet s Packet Padding Random Payload MAC Length Length Padding 1 byte variable 4 bytes 4-255 bytes — 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…

  11. Results – Internet wide scans (Honeypots)

  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

  13. Revision history for command selection — We looked for commands in t he revision hist ory (uname -a, t ft p) Cowrie < 2016-11-02 Cowrie ≥ 2016 -11-02 13

  14. Results (SSH) – Updating Honeypots — S S H Honeypot operat ors rarely updat e t heir honeypot s

  15. Results (SSH) – Set up options Only 79% of 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

  16. Legislation in the context of honeypots 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 of 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’ 16

  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

  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% of 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

  19. Q & A Alexander Vetterl alexander.vetterl@cl.cam.ac.uk https://github.com/amv42/sshd-honeypot

Recommend


More recommend