Coder Social home page Coder Social logo

kubescanner's Introduction

KubeScanner

Port Scanning Api

Input: IP or IP range + port or port range

Output: which ports are open on which IPs

$ ./PortDiscovery ipaddr ports

image

Service Discovery API

General concept

The service discovery's goal is to map a given host address and port to the following resolution:

  • Session layer protocol: TLS, SSH or none
  • Presentation layer protocol: HTTP, gRPC or else
  • Application layer protocol: MySQL, ElasticSearch, K8s API server, etc.

A given host and port can be identified as "TLS, HTTP, Kubelet", or "TCP, MySQL" as an example.

Since there are a lot of protocols which are dependent on the underlying session layer, the discovery API contains abstractions (interfaces) so there is no need for example to write different code that discovers "Kubernetes API server" in the case of HTTP or HTTPS.

Session layer protocols

See interface definitions in types.go of:

  • SessionLayerProtocolDiscovery - this interface is implemented per protocol (TLS, SSH)
  • iSessionLayerDiscoveryResult - this is the corresponding result object interface
  • iSessionHandler - session handler interface, it must have an implementation per protocol to enable presentation layer/application layer to work whit this layer

Example implementation in sl_tls.go which shows how it is implemented for TLS.

Transport layer protocols

See interface definitions in types.go of:

  • TransportLayerProtocolDiscovery - this interface is implemented per protocol (HTTP, gRPC)
  • iTransportLayerDiscoveryResult - this is the corresponding result object interface

Example implementation for HTTP discovery is in pl_http_discovery.go

CLI

Input: IP + Port

Output: Service type

Also checks for anonymous access for etcd server

$ ./ServiceDiscovery ipaddr Port

image

kubescanner's People

Contributors

0xquark avatar slashben avatar

Stargazers

 avatar

Forkers

bezbran

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.