Skip to content

Instantly share code, notes, and snippets.

Avatar

Johannes F. Knauf JohannesFKnauf

View GitHub Profile
@JohannesFKnauf
JohannesFKnauf / Dockerfile
Last active Apr 29, 2021
chatty ssh: an openssh patch for logging passwords
View Dockerfile
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 Jul 26, 2019
Analyse connection-level usage of a host
View analyse_tcpdump.py
#!/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)?
#