mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-16 11:58:47 +00:00
update cowrie
This commit is contained in:
parent
b4e0191e7f
commit
749df4181a
@ -5,7 +5,9 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
MAINTAINER kev <noreply@easypi.pro>
|
MAINTAINER kev <noreply@easypi.pro>
|
||||||
|
|
||||||
RUN apk add -U build-base \
|
RUN apk add -U bash \
|
||||||
|
build-base \
|
||||||
|
ca-certificates \
|
||||||
libffi \
|
libffi \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
openssl \
|
openssl \
|
||||||
@ -14,14 +16,12 @@ RUN apk add -U build-base \
|
|||||||
python-dev \
|
python-dev \
|
||||||
tar \
|
tar \
|
||||||
&& wget -qO- https://bootstrap.pypa.io/get-pip.py | python \
|
&& wget -qO- https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
&& pip install pyasn1 \
|
|
||||||
pyOpenSSL \
|
|
||||||
service_identity \
|
|
||||||
twisted \
|
|
||||||
&& adduser -D cowrie \
|
&& adduser -D cowrie \
|
||||||
&& cd /home/cowrie \
|
&& cd /home/cowrie \
|
||||||
&& wget -qO- https://github.com/micheloosterhof/cowrie/archive/master.tar.gz | tar xz --strip 1 \
|
&& wget -qO- https://github.com/micheloosterhof/cowrie/archive/master.tar.gz | tar xz --strip 1 \
|
||||||
&& mv cowrie.cfg.dist cowrie.cfg \
|
&& pip install -r requirements.txt \
|
||||||
|
&& sed '/Enable Telnet/{n;s/\(enabled\).*/\1 = true/}' cowrie.cfg.dist > cowrie.cfg \
|
||||||
|
&& sed -i 's/^\(VIRTUALENV_ENABLED\).*/\1=no/' bin/cowrie \
|
||||||
&& chown -R cowrie:cowrie . \
|
&& chown -R cowrie:cowrie . \
|
||||||
&& apk del build-base \
|
&& apk del build-base \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
@ -30,9 +30,9 @@ RUN apk add -U build-base \
|
|||||||
tar \
|
tar \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
EXPOSE 2222
|
EXPOSE 2222 2223
|
||||||
|
|
||||||
USER cowrie
|
USER cowrie
|
||||||
WORKDIR /home/cowrie
|
WORKDIR /home/cowrie
|
||||||
|
|
||||||
CMD ["twistd", "-n", "-l", "log/cowrie.log", "cowrie"]
|
CMD ["bin/cowrie", "start", "-n"]
|
||||||
|
@ -10,11 +10,12 @@ and, most importantly, the entire shell interaction performed by the attacker.
|
|||||||
|
|
||||||
## docker-compose.yml
|
## docker-compose.yml
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
cowrie:
|
cowrie:
|
||||||
image: vimagick/cowrie
|
image: vimagick/cowrie
|
||||||
ports:
|
ports:
|
||||||
- "2222:2222"
|
- "2222:2222"
|
||||||
|
- "2223:2223"
|
||||||
volumes:
|
volumes:
|
||||||
- ./dl:/home/cowrie/dl
|
- ./dl:/home/cowrie/dl
|
||||||
- ./log:/home/cowrie/log
|
- ./log:/home/cowrie/log
|
||||||
@ -23,7 +24,7 @@ cowrie:
|
|||||||
|
|
||||||
## server
|
## server
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ cd ~/fig/cowrie
|
$ cd ~/fig/cowrie
|
||||||
$ mkdir -p dl log/tty
|
$ mkdir -p dl log/tty
|
||||||
$ chmod -R 777 dl log
|
$ chmod -R 777 dl log
|
||||||
@ -39,8 +40,9 @@ $ tail -f log/cowrie.log
|
|||||||
|
|
||||||
## client
|
## client
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ ssh -p 2222 root@server
|
$ ssh -p 2222 root@server
|
||||||
|
$ telnet server 2223
|
||||||
```
|
```
|
||||||
|
|
||||||
> You can login as `root` with any password except `root` or `123456`.
|
> You can login as `root` with any password except `root` or `123456`.
|
||||||
|
@ -2,6 +2,7 @@ cowrie:
|
|||||||
image: vimagick/cowrie
|
image: vimagick/cowrie
|
||||||
ports:
|
ports:
|
||||||
- "2222:2222"
|
- "2222:2222"
|
||||||
|
- "2223:2223"
|
||||||
volumes:
|
volumes:
|
||||||
- ./dl:/home/cowrie/dl
|
- ./dl:/home/cowrie/dl
|
||||||
- ./log:/home/cowrie/log
|
- ./log:/home/cowrie/log
|
||||||
|
Loading…
Reference in New Issue
Block a user