Commit Graph

59 Commits

Author SHA1 Message Date
daniel_sagi
e16bc40fb7 minor services description improvements 2018-07-04 15:08:51 +03:00
daniel_sagi
05bea207fd bug fix: default secure value for services changed from False to True 2018-07-04 12:36:41 +03:00
daniel_sagi
43c27b611a Merge branch 'report_token_feature' of bitbucket.org:scalock/kube-hunter 2018-07-04 11:54:58 +03:00
daniel_sagi
16537e1ff6 changed a bit of report uploading process 2018-07-04 11:36:32 +03:00
Liz Rice
c2d2d56a32 Merged in liz (pull request #1)
Minor doc corrections
2018-07-04 08:15:36 +00:00
Liz Rice
76bd6d456e Minor English corrections in the README 2018-07-03 17:10:09 +01:00
Liz Rice
e3a74b577e Improve help message 2018-07-03 17:00:19 +01:00
daniel_sagi
23c03afc02 added interactive choosing of scanning options 2018-07-02 16:20:14 +03:00
daniel_sagi
03760724ac + added report url handling on end of run, when specifiyng token 2018-06-27 14:13:49 +03:00
daniel_sagi
aa25e83a99 moved report generation functions to inner functions, also added token flag, and the lambda url sending function 2018-06-21 19:47:10 +03:00
daniel_sagi
464e7aad1f Added exception handling and improved help 2018-06-21 13:45:19 +03:00
daniel_sagi
8c6712f378 1. Changed report methods and renamed "log" module to "", added another report generation in a new json format
2. started to add the --token option to send the finished report.
3. changed a bit of kubelet vulnerability output architecture to match out conventions.
4. added healthz check on kubelets
2018-06-20 12:09:40 +03:00
daniel_sagi
2b690056b0 Fixed type in privileged, also moved Components to core.types 2018-06-19 11:07:18 +03:00
daniel_sagi
dc830b1281 changed README 2018-06-18 16:42:50 +03:00
daniel_sagi
b024660f55 added link to developer readme 2018-06-18 16:28:34 +03:00
daniel_sagi
808ccdb1b5 added src README 2018-06-18 16:26:49 +03:00
daniel_sagi
5f05004657 changed README 2018-06-18 10:47:38 +03:00
daniel_sagi
54aa13d1b3 Added mapping option 2018-06-18 10:46:03 +03:00
daniel_sagi
725161cab9 Changed readme 2018-06-17 19:16:59 +03:00
daniel_sagi
5055f9a809 removed dockerignore 2018-06-17 19:15:49 +03:00
daniel_sagi
68e66da62d Added Readme 2018-06-17 19:13:02 +03:00
daniel_sagi
254b31f90c chenged requirements back to no specific version of some packages 2018-06-17 19:02:17 +03:00
daniel_sagi
fac667552e added cidr option, also added a while true when running on a pod, to halt for seeing results before restart 2018-06-17 19:01:23 +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
c2e089b6a5 removed unnecessary Information imports 2018-06-12 14:31:07 +03:00
daniel_sagi
73a4e83781 Added checks on api responses before json.loads, added a quick scanning option, to scan part of the subnet 2018-06-12 14:30:28 +03:00
daniel_sagi
c52e684272 removed passing of active attribute to results printing 2018-06-12 13:16:35 +03:00
daniel_sagi
e4c9beb653 added prove of running pods 2018-06-12 12:57:29 +03:00
daniel_sagi
ca5c168bef changed order of rows in result table 2018-06-12 12:57:10 +03:00
daniel_sagi
1102587704 Added joining of queue at the end of the run, kube-hunter now stops alone 2018-06-12 12:40:21 +03:00
daniel_sagi
3f174364f7 Added cloud identifiering for each type of host scan, using azurespeed. Now AzuerSpn hunting will be triggered only if the host is an azure cluster. using predicate, and the new 'cloud' attribute 2018-06-12 12:10:59 +03:00
daniel_sagi
973c2a25a0 changed output results table format, added AzureMetadata vulnerability on discovery 2018-06-11 20:02:25 +03:00
daniel_sagi
7e939b4544 finished aks spn hunting 2018-06-11 18:44:54 +03:00
daniel_sagi
548ae7e486 changed evidence of priviledged containers, also added casting to str in reporter 2018-06-11 18:28:01 +03:00
daniel_sagi
9bb835edd3 added azure spn subscription hunting 2018-06-11 18:26:58 +03:00
daniel_sagi
838be65967 Added proves for vulnerabilities, added 'evidence' field for every vulnerability to be filled be provers(mostly ActiveHunters) 2018-06-11 18:01:54 +03:00
daniel_sagi
75393da91a simplified kubelet open handlers hunting and types 2018-06-11 14:26:09 +03:00
daniel_sagi
01c4aac105 Active hunting is now available by inheriting from ActiveHunter. the hunter wil subscribe only if the --active flag was set.
1. Removed scanning configuration from events, from now on, scanning config is accessed from the main module
2. Moved core types to a "toplevel" file
2018-06-11 12:39:11 +03:00
daniel_sagi
70ea40367b fixed bug: empty remote option 2018-06-10 20:10:26 +03:00
daniel_sagi
a2e37927bd changed directory tree of all modules and packages, for easing on future implementations and extensions 2018-06-10 20:09:09 +03:00
daniel_sagi
1934d21c99 changed metavar on remote flag 2018-06-10 19:48:34 +03:00
daniel_sagi
faa7571127 1. Added an --active flag, to allow optional "Proof" result, which will do an active hunting of a found vulnerability
2. Added a --remote flag to specify remote clusters/machines for hunting.
3. Improved a bit of the architecture, (Services)

Note:
The reporter module, will gather vulnerabilities before their active hunting will start.
This is not an issue, as we can access all of the attributes of the event directly from the active hunter (event.previous), which we will proccess on the end in the report
2018-06-10 19:34:12 +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
9e8dfbc34e added hunting for open debug handlers on the kubelet 2018-05-28 19:37:30 +03:00
daniel_sagi
a465c3f2eb 1. Changed order of modules and pacakges in directories.
2. Changed method of hidden stacking of event, to send self as an argument, by inheriting from "Hunter" class. where the publish acts as a proxy to the handler.
3. Added new way of categorizing events, while added an option to subscribe to a father event. if en event gets publish, if its father event is hooked, the hook will be triggered
4. Added a reporter in log/ which listens to parent events, meanwhile Vulnerability and OpenService were added. all logging will be made from reporter from now on
2018-05-27 17:45:34 +03:00
daniel_sagi
69dba8f1c7 Merge branch 'KubeHunter2' 2018-05-24 16:06:00 +03:00
daniel_sagi
290f87de70 1. added log/
2. Started adding kubelet scanning.
3. Changed events architecture. All events are inheriting from "Event" class. when instantiating and defining a new event class, attributes other than what is important for that perticular event are not needed. the event handler will be stacking the events, so that each event will have all the attributes of its successors.
This proccess is invisible to the developer, but needs to be acknowledged.
*note: from now on, all executors needs to set self.event to given arg on init*
Example (pseudo):

@subscribe(NewHostEvent)
def PortScan(event):
		publish(OpenPortEvent(port="8080"))

@subscribe(OpenPortEvent)
def print(event):
		print(event.host)

publish(NewHostEvent(host="0.0.0.0"))
>> output: 0.0.0.0

the print function recieves an open port event. even though when publishing the OpenPortEvent we did not specify a host, the print function can access the "host" attribute, as the OpenPortEvent successor was NewHostEvent. if "host" was not defined on the succesors, it is "None"
2018-05-24 15:39:31 +03:00
daniel_sagi
672c59f576 Added events/ folder.
Added dynamic imports for all modules inside: 'events/',  'discovery/', 'hunting/' (you can now add new files with new implementations, and not worry about imports.)
Changed port timeout to be 1.5 seconds, more reliable results.
Changed default log level to INFO
2018-05-15 15:57:42 +03:00