Skip to content

Instantly share code, notes, and snippets.

View JohannesFKnauf's full-sized avatar

Johannes F. Knauf JohannesFKnauf

View GitHub Profile
@JohannesFKnauf
JohannesFKnauf / Dockerfile
Last active April 29, 2021 19:04
chatty ssh: an openssh patch for logging passwords
FROM ubuntu
RUN sed -i -e 's/^# deb-src/deb-src/' /etc/apt/sources.list && \
apt-get update && \
apt-get upgrade --assume-yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes --no-install-recommends tzdata && \
apt-get build-dep --assume-yes openssh-server && \
apt-get install --assume-yes build-essential fakeroot devscripts && \
mkdir src && cd src && \
apt-get source openssh-server && \
@JohannesFKnauf
JohannesFKnauf / analyse_tcpdump.py
Created July 26, 2019 07:52
Analyse connection-level usage of a host
#!/usr/bin/python3
#
# The purpose of this snippet is preprocessing log files generated by a
# tcpdump -i ... -nn -q -l -tttt > sample.tcpdump.log
#
# in order to perform a connection-level analysis:
# Which remote host (as identified by IP) was communicating with us,
# over what transport protocol (UDP, tcp) and
# how often (at a granularity of days)?
#