cviko auth
This commit is contained in:
commit
bc22012846
|
@ -0,0 +1,40 @@
|
|||
FROM ubuntu:20.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y build-essential git libssl-dev && \
|
||||
#git clone https://github.com/openwall/john -b bleeding-jumbo john-jumbo && \
|
||||
#cd john-jumbo/src && \
|
||||
#./configure && \
|
||||
#make -sj 12 && \
|
||||
#ln -s /john-jumbo/run/keepass2john /usr/local/bin/keepass2john && \
|
||||
cd / && \
|
||||
#add-apt-repository ppa:eugenesan/ppa && apt update && apt-get install keepass2 && \
|
||||
apt-get install -y \
|
||||
wget \
|
||||
apache2 \
|
||||
openssl \
|
||||
john \
|
||||
hydra \
|
||||
libssl-dev \
|
||||
keepass2 \
|
||||
build-essential \
|
||||
keepass2 \
|
||||
&& apt-get clean
|
||||
|
||||
RUN wget https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt -O /rockyou.txt
|
||||
|
||||
COPY password_crack.sh /opt/password_crack.sh
|
||||
COPY keepass_crack.sh /opt/keepass_crack.sh
|
||||
COPY apache_config.sh /opt/apache_config.sh
|
||||
COPY steve_passwords.kdbx /opt/steve_passwords.kdbx
|
||||
|
||||
RUN chmod +x /opt/*.sh
|
||||
|
||||
RUN mkdir -p /var/www/web.ssb && echo "<h1>Hello world</h1>" > /var/www/web.ssb/index.html
|
||||
|
||||
RUN /opt/apache_config.sh
|
||||
|
||||
CMD ["bash"]
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
APACHE_CONF="/etc/apache2/sites-available/000-default.conf"
|
||||
|
||||
a2enmod ssl
|
||||
a2ensite default-ssl
|
||||
|
||||
mkdir -p /etc/apache2/ssl
|
||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
||||
-keyout /etc/apache2/ssl/apache.key \
|
||||
-out /etc/apache2/ssl/apache.crt \
|
||||
-subj "/C=US/ST=State/L=City/O=Organization/OU=Unit/CN=wev.ssb"
|
||||
|
||||
echo '
|
||||
<VirtualHost *:443>
|
||||
ServerAdmin admin@localhost
|
||||
|
||||
DocumentRoot /var/www/web.ssb
|
||||
ServerName web.ssb
|
||||
ServerAlias www.web.ssb
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/apache2/ssl/apache.crt
|
||||
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
<Directory "/var/www/web.ssb">
|
||||
AuthType Basic
|
||||
AuthName "Restricted Content"
|
||||
AuthUserFile /etc/apache2/.htpasswd
|
||||
Require valid-user
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
' > $APACHE_CONF
|
||||
|
||||
htpasswd -cb /etc/apache2/.htpasswd test admin
|
||||
|
||||
service apache2 restart
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
john --wordlist=/rockyou.txt <(keepass2john /opt/steve_passwords.kdbx)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
john --fork=8 --wordlist=/rockyou.txt --format=crypt <(echo '$1$randsalt$1FzqFfQs5tCdStIZl215/.')
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue