GithubHelp home page GithubHelp logo

zalgonoise / dumpt Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 11 KB

An Stunnel proxy server with tcpdump, to monitor network traffic when configured with Google Workspace Secure LDAP

License: MIT License

Dockerfile 14.90% Shell 85.10%

dumpt's Introduction

dumpt

CI


Description

An Stunnel proxy server with tcpdump, to monitor network traffic when configured with Google Workspace Secure LDAP.

This container will allow you to add the .crt/.key pair generated in your Admin Console (as a zip file, or individual .crt/.key files) on the /data folder in the container, which in turn will pre-configure the Stunnel for Google Workspace Secure LDAP.


Running dumpt

Start an stunnel service with tcpdump in Docker, by running:

with a .zip file:

docker run -it \
    -v $(find /path/to/dir/ -maxdepth 1 -name "Google*.zip"):/data/Google.zip \
    -v /path/to/output:/data/out \
    -p 1636:1636 \
    --name dumpt \
    zalgonoise/dumpt:latest

with a .crt/.key pair:

docker run -it \
    -v $(find /path/to/dir/ -maxdepth 1 -name "Google*.crt"):/data/stunnel.crt \
    -v $(find /path/to/dir/ -maxdepth 1 -name "Google*.key"):/data/stunnel.key \
    -v /path/to/output:/data/out \
    -p 1636:1636 \
    --name dumpt \
    zalgonoise/dumpt:latest

tcpdump Contents

The tool will generate a .pcap file that is placed on /data/out, thus linking this folder as a volume from your machine.

Files will not overwrite, don't worry -- they increment as numbered files

You can then analyze your .pcap file with other tools, including Wireshark.


Container configuration

The container is using my zalgonoise/alpine base image to take advantage of the s6-overlay, to create running services.

This way, there is no need to send processes to the background blindly and better monitoring for runtime errors.

Stunnel is configured in /etc/stunnel/stunnel.conf, by creating a preset configuration file:

cd /etc/stunnel

cat << EOF > stunnel.conf
foreground = yes

setuid = stunnel
setgid = stunnel

socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

[${SERVICE:-ldap}]
client = ${CLIENT:-yes}
accept = ${ACCEPT:-1636}
connect = ${CONNECT:-ldap.google.com:636}
cert = /data/stunnel.crt
key = /data/stunnel.key
EOF

Your certificate and key are moved to /data/stunnel.* in conformity to this configuration.

tcpdump on the other hand is just listening for network activity in this container. Since we are expecting the interactions to be solely between the LDAP client and Google, all network traffic in the machine is worth capturing. Further filtering can be placed in the analyzer tool of choice.

The command ran is the following:

tcpdump -i eth0 -vvv -w ${outfile}

dumpt's People

Contributors

zalgonoise avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.