Commit Graph
20 Commits
Author SHA1 Message Date
df12d75d6d Packaging Kube-Hunter for PyPi (#272)
* Inital Commit

Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>

* Suggestions implemented as suggested

Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>

* Package with setuptools

Use setuptools to package kube-hunter as redistributable file.
Once packages, it can be pushed to PyPi.
The package version is taken from git tags (using setuptools_scm).

Closes #185

* Ignore __main__.py script in code coverage

The entrypoint script should not be tested but rather be calling
to tested modules.
Ideally, __main__ should only make a call to single function from
another tested module.

* Update requirements files

Use install_requires from setup.cfg file as single source of truth
for dependencies.
Install regular dependencies when installing dev dependencies.

* Symlink kube-hunter.py to entry point

Support the old way to run kube-hunter via the main script by making
a link to the new kube_hunter/__main__.py script.

Co-authored-by: Yehuda Chikvashvili <yehudaac1@gmail.com>
2020-02-10 21:35:31 +02:00
Yehuda ChikvashviliandItay Shakury efd23433ff Support macOS (#273)
Upgrade scapy to version 2.4.3 and above.
This commit fixes IndexError that was raised when running
kube-hunter from macOS.

Resolves #262
2019-11-05 12:53:44 +02:00
danielsagiandLiz Rice 259f707ecd Refactor And Major Bug Fixes in Version and CVE hunting (#162)
* changed version hunting to be on a a new version disclosure vulnerability

* fixed version publish

* added logging and fixed typo

* changed whole way of comparing versions in cve hunter

* changed K8sVersionDisclosure vulnerability to one core vulnerability, that takes an endpoint. changed all usage

* added tests

* merged kubectl cve hunting with apiserver hunting. and simplified the code of apiserver cve hunting

* fixed tests to new names

* changed name of module to cves.py

* drastically improved the cve vulnerble detection utility function. now works with all types of versioning methods

* added packaging in requirementes.txt

* added another test, and improved logic on cve comparison for more complicated versions

* changed CveHunter to subscribe_once, to prevent duplicates duplicates

* fixed tests for new improvements

* removed unnecessary ternary on doc

* removed unnecessary join split

* improved compare function, made it util

* improved cve checking to use mapping
2019-08-27 08:48:47 +01:00
Daniel Sagi 9204d34244 changed enum34 to be installed only under python version 3.4 2019-06-03 20:16:39 +03:00
Daniel Sagi 55ed8d0a80 added enum34 to requirements.txt 2019-05-25 20:00:55 +03:00
Liz Rice d6f76dc295 CVE-2019-11324 2019-05-14 15:15:11 +01:00
nshauli b4df6b5298 Add support for hunters list as part of the reports.
Each reported hunter includes name, description and number of events.
Add severity field to each vulnerability report.
2019-05-14 12:44:30 +03:00
nshauliandjerbia f0160e2eba Update imports and dependencies for creating single application of kube-hunter using pyinstaller (#114) 2019-04-16 15:37:34 +03:00
Weston Steimel 71f52c0d2c add future as requirement
Signed-off-by: Weston Steimel <weston.steimel@gmail.com>
2019-03-04 21:38:05 +00:00
Liz Rice 8c0e2b00a9 Fail build if tests don't succeed 2019-02-22 20:17:31 +00:00
Cosmin Cojocar 74943f10d1 Refactor the reporter and add an YAML report format
Separate the events collection from report rendering, in order
to allow different type of reports.
2018-08-20 10:03:26 +02:00
daniel_sagi 254b31f90c chenged requirements back to no specific version of some packages 2018-06-17 19:02:17 +03:00
daniel_sagi 1168a068af updated version packages 2018-06-12 17:13:17 +03:00
daniel_sagi f3b9b5200f added requirements.txt 2018-06-12 16:55:22 +03:00
daniel_sagi 36e87807e6 1. completely transferred all event types to their corresponding module
2. started working on results table.
3. *added convention* from now on, every vulnerability/service event, should have a __doc__ that describes them. notice the new get_name(), component, and explain() attributes that needs to be implemented as well.
2018-06-10 16:43:05 +03:00
daniel_sagi 4a98d698a1 1. Added --pod flag to option "from pod" hunting. this will hunt the internal subnet of the cluster.
2. Added service account token and certificate handling, when running as a pod, to try and access resources that are "secured"
3. Added anonymous auth vulnerability detection
4. Changed requirements.txt for compatibility
2018-06-06 10:08:02 +03:00
daniel_sagi c735b5df95 Started adding KubeProxy hunting, basic services detection mechanism was added.
The idea is discovering sub paths of resources in the api and sending them for hunting.

Added Dashboard detection from Proxy.
Also improved architecture of discovery/hunting from a "secure" perspective
2018-05-15 12:35:36 +03:00
daniel_sagi 48e1307f1d Added EventQueue class, to handle events.
Events now gets processed asynchronously.
2018-05-10 14:25:29 +03:00
Shir cd880ec50e Delete everything of Kube Hunter 1.0 2018-05-06 19:50:00 +03:00
daniel_sagi c8c8cd9ebd Fixed failed tries to scan unimplemented services
Added an empty url to dashboard hunter
Added chrome binary to automatically be install
2018-04-23 20:06:20 +03:00