Compare commits

..

5 Commits

Author SHA1 Message Date
danielsagi
f8eb9cd252 Merge branch 'master' into improve-dockerfile 2020-08-14 19:10:08 +03:00
danielsagi
cd1f79a658 fixed typo (#363) 2020-08-14 19:09:06 +03:00
Daniel Sagi
1d56617de5 added ebtables and tcpdump packages to multistage 2020-08-07 06:51:52 -07:00
Daniel Sagi
6f3a02414d removed unnecessary files from final image, using multistaged build 2020-08-07 06:18:25 -07:00
Liz Rice
2428e2e869 docs: fix broken CONTRIBUTING link (#361) 2020-07-03 11:59:53 +03:00
2 changed files with 11 additions and 1 deletions

View File

@@ -16,4 +16,14 @@ RUN make deps
COPY . .
RUN make install
FROM python:3.8-alpine
RUN apk add --no-cache \
tcpdump \
ebtables && \
apk upgrade --no-cache
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
COPY --from=builder /usr/local/bin/kube-hunter /usr/local/bin/kube-hunter
ENTRYPOINT ["kube-hunter"]

View File

@@ -70,7 +70,7 @@ class DnsSpoofHunter(ActiveHunter):
def execute(self):
config = get_config()
logger.debug("Attempting to get kube-dns pod ip")
self_ip = sr1(IP(dst="1.1.1.1", ttl=1) / ICMP(), verbose=0, timeout=config.netork_timeout)[IP].dst
self_ip = sr1(IP(dst="1.1.1.1", ttl=1) / ICMP(), verbose=0, timeout=config.network_timeout)[IP].dst
cbr0_ip, cbr0_mac = self.get_cbr0_ip_mac()
kubedns = self.get_kube_dns_ip_mac()